My PHP output displays escaped apostrophes and quotes. Given the following
example FORM and PHP3 script:
index.html ==============
<HTML>
<HEAD></HEAD>
<BODY>
<FORM method="post" action="http://www.somedomain.com/myscript.php3">
Enter data:
<INPUT type="text" name="mydata"><BR>
<INPUT type="submit" name="submit" value="Submit">
</FORM>
</BODY>
</HTML>
myscript.php3=====================
<HTML>
<HEAD></HEAD>
<BODY>
<?php
print $mydata;
?>
<BR>
</BODY>
</HTML>
======================
In the text field, if the user enters: I'm
the the following is displayed by the PHP script: I\'m
I've tried the following, with variations:
print "$mydata";
print '$mydata';
echo $mydata;
echo "$mydata";
printf ("%s",$mydata);
I've tried: ereg_replace("\\","",$mydata);
All have been unsuccessful on the web host that I use, which is Apache with
PHP 3
That said, on another Apache server with PHP 3, I get the output I want and
expect. That is, no back-slash precedes the apostrophe or quote.
What do I need to do to eliminate the back-slash?
thanks
Richard L. Emery
IT Sr. Project Manager
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]