Jump to content

PHP/HTML form returning weird characters


minicoop503

Recommended Posts

So, I made an html form and then a php script to get the data entered and send them in an email.

 

The only problem is whenever someone enters an ' or ", such as "don't", it shows up in the email as "don\'t" or the quotes are \".

 

Any ideas on why it is doing this?

 

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/176623-phphtml-form-returning-weird-characters/
Share on other sites

If you're not doing it yourself (i.e. addslashes), then check your PHP magic quotes setting. See below.

 

"If magic_quotes_runtime  is enabled, most functions that return data from any sort of external source including databases and text files will have quotes escaped with a backslash."

 

http://www.php.net/manual/en/info.configuration.php#ini.magic-quotes-runtime

 

http://www.php.net/manual/en/function.set-magic-quotes-runtime.php

 

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.