jason13 Posted February 11, 2008 Share Posted February 11, 2008 Hi there, This is probably, to you guys, the equivalent of breathing, but I'm drowning in even the simplest of code! Basically, I've put up my website (built entirely in Flash) and I have a contact form. Now, it works ok, but I've got a couple of problems which are driving me batty: 1) When I recieve an email from the form, the 'from' field and reply-to fields are screwy. Say, for example, someone submitted the form with the email address "[email protected]" - I would, if hitting 'reply' in my mail client, be given this as a return address: "[email protected] <P ALIGN=\"LEFT\"FONT FACE=\"Times New Roman\" SIZE=\"14\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\"/FONT/P>" I can't seem to find any way to get rid of it. I've pored through this site using the search option, but to be honest you guys would be as well talking in Japanese to me - I'd understand about as much! 2) A minor thing on top of the above - apostrophes, etc, in the email body are coming up as "'" - is there a way to fix that? My php code is this: <?php $sendTo = "[email protected]"; $subject = "Jason13"; $headers = "From: " . $_POST["name"]; $headers .= "<" . $_POST["email"] . ">\r\n"; $headers .= "Reply-To: " . $_POST["email"] . "\r\n"; $headers .= "Return-Path: " . $_POST["email"]; $headers .= 'MIME-Version: 1.0' . "\r\n"; $headers .= "Content-Type: text/html; charset=utf-8\r\nContent-Transfer-Encoding: 8bit\r\n\r\n"; $message = $_POST["message"]; mail($sendTo, $subject, $message, $headers); ?> Like I say, I know this is uber-basic stuff for folk like you, but considering I'd never even heard of php until about two days ago, I'm pretty much lost at sea. Any help would be massively appreciated! Thanks, - Jase Link to comment https://forums.phpfreaks.com/topic/90502-help-with-fairly-basic-email-form/ Share on other sites More sharing options...
aebstract Posted February 11, 2008 Share Posted February 11, 2008 Can you show the code that creates the email? I'm thinking when you set your email address for the from, you're using single quotations outside of your data, which is why it is giving you "[email protected] <P ALIGN=\"LEFT\"FONT FACE=\"Times New Roman\" SIZE=\"14\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\"/FONT/P>" In the last part, it seems you missed a < in front of your </p> so you're left with just the /p> If what I said about you putting this in single quotations is true, then you don't need the \ in front of the ". Seeing some code would help though! Link to comment https://forums.phpfreaks.com/topic/90502-help-with-fairly-basic-email-form/#findComment-464015 Share on other sites More sharing options...
jason13 Posted February 11, 2008 Author Share Posted February 11, 2008 Can you show the code that creates the email? I'm thinking when you set your email address for the from, you're using single quotations outside of your data, which is why it is giving you "[email protected] <P ALIGN=\"LEFT\"FONT FACE=\"Times New Roman\" SIZE=\"14\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\"/FONT/P>" In the last part, it seems you missed a < in front of your </p> so you're left with just the /p> If what I said about you putting this in single quotations is true, then you don't need the \ in front of the ". Seeing some code would help though! Hi there. I'm not 100% sure which code you mean. I thought the php stuff I posted was the code that creates the email... *embarassed look* The only other code I've entered at any point is within Flash CS3 itself, which was the actionscript on the 'email me' button: on(release){ form.loadVariables("email.php", "POST"); } The site I got the php script from said the 'POST' thing was a standard PHP server function provided by the webhost, if that helps at all? Link to comment https://forums.phpfreaks.com/topic/90502-help-with-fairly-basic-email-form/#findComment-464020 Share on other sites More sharing options...
aebstract Posted February 11, 2008 Share Posted February 11, 2008 I guess I was asking about the form you are using to enter the contact information. Link to comment https://forums.phpfreaks.com/topic/90502-help-with-fairly-basic-email-form/#findComment-464027 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.