Hello, I'm very new to PHP but I find it very interesting. My form works just fine, but when I receive an email from a client there are / characters in front of apostrophes. Example: When a user types: I'm interested in a new design idea for one of our client's. It comes to my email with this: I/m interested in a new design idea for one of our client/s. Does anyone know where I would put in the Stripslashes command so I can see apostrophes instead of slashes? Here is my php code:
<?php $to = $_REQUEST['sendto']; $from = $_REQUEST['Email']; $name = $_REQUEST['Name']; $headers = "From: $from"; $subject = "Web Contact Data"; $fields = array(); $fields{"Name"} = "Name"; $fields{"Company"} = "Company"; $fields{"Email"} = "Email"; $fields{"Phone"} = "Phone"; $fields{"Message"} = "Message"; $body = "We have received the following information:\n\n"; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); } $headers2 = "From: [url="http://forums.xisto.com/no_longer_exists/;'>http://forums.xisto.com/no_longer_exists/;;'>http://forums.xisto.com/no_longer_exists/;'>http://forums.xisto.com/no_longer_exists/;; $subject2 = "Thank you for contacting us"; $autoreply = "Thank you for contacting us. Somebody will get back to you as soon as possible. If you have any more questions, please consult our website at [url="http://forums.xisto.com/no_longer_exists/&'>http://forums.xisto.com/no_longer_exists/& == '') {print "You have not entered an email, please go back and try again";} else { if($name == '') {print "You have not entered a name, please go back and try again";} else { $send = mail($to, $subject, $body, $headers); $send2 = mail($from, $subject2, $autoreply, $headers2); if($send) {header( "Location: [url="http://forums.xisto.com/no_longer_exists/;'>http://forums.xisto.com/no_longer_exists/; );} else {print "We encountered an error sending your mail, please notify [email=webmaster@YourCompany.com]webmaster@YourCompany.com[/email]"; } }}?>Many Thanks! Notice from rvalkass:
Code tags added around the PHP code.