Is it illegal to put an x near a signature line on contract?
No, you can put an X or an arrow or a little sticky tag that says "Sign Here" or any other indication that a signature is required. If you're asking if the "X" mark constitutes a valid signature, the answer is "probably", but only if it was made with the intent to be a signature on the document.