I have a text form field on one page, that posts the input to another page. So if the form is on page1.php, and lets say the form is like this: <form method="post" action="page2.php"> Now, the field I am talking about is a text field, so lets say it looks like this: <input type="text" name="variablename" id="textfield" /> The problem is, that I want to input a single quote (") in the form field. But when I view the output on the page receiving the results (page2.php) the quote is escaped by a preceding slash (\) so the posted data is \" . How do I change something so that is is just passing the quote? Thanks
Hello bloard I've run accross this issue many times and the only solution I've ever seen is to replace " with " so before you write out the value in you PHP you could replace all " characters with " Good luck
Hello, bloard. I think you should revise your PHP configuration. There is an option called "magic_quotes" that sets the magic_quotes state for Get/Post/Cookie operations. When magic_quotes are on, all ' (single-quote), " (double quote), \ (backslash) and NUL's are escaped with a backslash automatically. I understand that this can be modified at run time, but you should ask for more information at the PHP forum. Good luck.