Jump to content

Recommended Posts

'Folk'

 

If you're getting \'Folk\', then you need to use stripslashes()

 

Thats wierd.  On my test machine php 5 with wamp server it works perfectly fine.  On the live site php 4 it doesn't work.

 

My web developer is telling me the cookie value is  'Folk', but for some reason on the page its saying the cookie value is \'Folk'\

 

Do you know why it would do that?

 

I tested to see what value its putting in the cookie...and its putting in 'Folk'.

 

But when I display the value it says its \'Folk\'

 

I don't understand how it can display the wrong value?

 

 

 

PHP automaticaly adds backslashes before all single quotes, double quotes, and backslashes to data that is received through GET, POST, and COOKIE. It's a security feature called Magic Quotes, and can be read about here on PHP's website: http://us3.php.net/manual/en/security.magicquotes.what.php and you can find out even more about it if you wish to google it or something. As KingPhilip said, simply using the function stripslashes() will take away the slashes added by Magic Quotes.

PHP automaticaly adds backslashes before all single quotes, double quotes, and backslashes to data that is received through GET, POST, and COOKIE. It's a security feature called Magic Quotes, and can be read about here on PHP's website: http://us3.php.net/manual/en/security.magicquotes.what.php and you can find out even more about it if you wish to google it or something. As KingPhilip said, simply using the function stripslashes() will take away the slashes added by Magic Quotes.

 

I see.  Thanks guys.

 

 

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.