Here's my code
$data = "This \" is a quote";
echo "<input type=\"text\" name=\"user\" value=\"$data\" size=\"14\" maxlength=\"16\"><br>";
The text box always shows "This " instead of "This " is a quote". I assume that the HTML code is cutting off VALUE when it sees the quote in the string because essentially, I am echoing:
<input type="text" name="user" value="This " is a quote" size="14" maxlength="16"><br>
How can i make this work? Or, if anyone has a better solution to preventing SQL injection, but still allowing quotes, Please tell me! I don't want to have to eliminate quotes all together.