My PHP output displays escaped apostrophes and quotes.  Given the following
example FORM and PHP3 script:

index.html ==============
<FORM method="post" action="">
Enter data:
<INPUT type="text" name="mydata"><BR>
<INPUT type="submit" name="submit" value="Submit">

print $mydata;

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

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?


Richard L. Emery
IT Sr. Project Manager

PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to