Jump to content

Backslashes in a form


Stevejon

Recommended Posts

Hi,
I have a problem with the form on my website here:
http://www.yeparticles.com/order/

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:

$articleDetails['comments'] = stripslashes($_POST['comments']);

$articleDetails['articlenames'] = stripslashes($_POST['articlename']);

$articleDetails['articlekeywords'] = stripslashes($_POST['articlekeyword']);


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')

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.

Thanks,
Steve
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.