Backslashes in a form
I have a problem with the form on my website here:
The problem is that all ' (single-quote), " (double quote) and \ (backslash) are escaped with a backslash automatically.
I turned off magic_quotes in php.ini, but the problem is still there (I used phpinfo to check that magic_quotes are really off).
So I used stripslashes() in the code that pass the values into the database:
The problem is that it works only for the "General Guidelines for All Articles" textarea ('comments') and not for the 2 other fields: "Subject" + "Keywords/Comments" ('articlenames' + 'articlekeywords')
$articleDetails['comments'] = stripslashes($_POST['comments']);
$articleDetails['articlenames'] = stripslashes($_POST['articlename']);
$articleDetails['articlekeywords'] = stripslashes($_POST['articlekeyword']);
In order to see that, you can fill in this page an email address + subject+words for one article, then click 'continue', and then click 'edit' in the Shopping Cart.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)