Jump to content

[SOLVED] $_POST special characters, gives unwanted backslashes \


azazel141

Recommended Posts

I am submitting values from a form.

One of these fields is called info. The value of info is: "PHP freaks rule".

 

When I watch the value on the next page with echo $_POST[info] I get the value: \"PHP freaks rule\". Is there any way to get rid of these backslashes. I don't want to remove the backslashes users have entered. So a function that replaces all backslashes in the string won't help me.

 

So I want the value and the return to be exactly the same.

 

more examples:

value: "PHP freaks rule"

return: \"PHP freaks rule\"

 

value: \"_/\_"/

returns: \\\"_/\\_\"/

 

EDIT: I found some stuff on google, does it matter that I'm working on localhost? The website is ment to go online soon though.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.