Allowing ' in input fields.
Posted: Sun Mar 19, 2006 8:45 am
When a user posts a secret question to there database profile I'd like the system to be able to accept ' symobls.
However it interprets this as part of the command and returns errors. I thought adding: $user_sq = htmlspecialchars($user_sq);
would work but it doesn't.
Any ideas how to get round this one?
However it interprets this as part of the command and returns errors. I thought adding: $user_sq = htmlspecialchars($user_sq);
would work but it doesn't.
Any ideas how to get round this one?
Code: Select all
$user_sq = htmlspecialchars($user_sq);
// All checks complete - Update!!!
$sql = mysql_query("UPDATE usr_table SET user_name='$new_user_name', user_email='$new_user_email', user_sa='$user_sa', user_sq='$user_sq' WHERE user_number=$user_number") or die (mysql_error());