character problem

From: Date: Mon, 12 Feb 2001 16:41:36 +0000
Subject: character problem
Groups: php.general 
Request: Send a blank email to php-general+get-39229@lists.php.net to get a copy of this message
I've created a PHP script that is called from a form to send an email. The contents of the email is a hidden value in the form named "info," and is typically a paragraph of text. It works fine, however, for some reason, the apostrophy character always gets emailed looking like this: /' I've tried everything to get around this. Any ideas? Here's my script and form: Form: <form name="form1" method="GET" action="emailsender.php"> <p>Email this product info to a friend</p> <input type="text" name="email"> <input type="submit" name="Submit" value="Email Info"> <input type="hidden" name="info" value="This is the text that gets emailed. I'm having problems with the apostrophe character in this text though"> </form> Script file named emailsender.php: <?php print "<p>The product info has been mailed to: <b>$email</b>"; $to = $email; $sender ="info@challenger.org"; MAIL( "$email", # address to send $info email to "Product Info", # subject "$info", # hidden form field containing text to email "From: $sender\nX-Mailer: PHP/" . phpversion()); ?> Thanks in advance, John __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/

« previous php.general (#39229) next »