julieb Posted September 8, 2008 Share Posted September 8, 2008 Hi there. I am a total n00b when regarding php. I bought this form on Flashden. http://flashden.net/item/contact-form-xml/16895 I have tried to get info from the creator of form regarding this problem but he didn't respond yet to it. When the email gets sent to me, it only shows the message. I don't have the slightest idea how to fix this. I was wondering if I could get some help. I would definitely appreciate it. I am attaching the php file. Thank you so much Julie I hope I am not dupping this topic. If so I truly apologize. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/123265-phpxml-form-problem/ Share on other sites More sharing options...
JonnoTheDev Posted September 8, 2008 Share Posted September 8, 2008 Overwrite with the following: if($error)exit(); $msg = "Name: ".$_POST["name"]."\n\n"; $msg .= "Email: ".$_POST["email"]."\n\n"; $msg .= "Phone: ".$_POST["phone"]."\n\n"; $msg .= "Subject: ".$_POST["subject"]."\n\n"; $msg .= "Message: ".$_POST["message"]."\n\n"; $ok=mail($sendTo, $subject, $msg, $headers); I cant believe you paid for this! Quote Link to comment https://forums.phpfreaks.com/topic/123265-phpxml-form-problem/#findComment-636581 Share on other sites More sharing options...
julieb Posted September 8, 2008 Author Share Posted September 8, 2008 Like I said I am a n00b, LOL! Probably don't even qualify as a n00b. I tried to see if I could change the form by adding more text fields, Like 7 on the right and 7 on the left and a large one multi on the bottom. But I got lost with that. when I add this code, do I keep this below what you gave me? if($ok)echo "result=message sent.";else echo "result=message not sent."; ?> Overwrite with the following: if($error)exit(); $msg = "Name: ".$_POST["name"]."\n\n"; $msg .= "Email: ".$_POST["email"]."\n\n"; $msg .= "Phone: ".$_POST["phone"]."\n\n"; $msg .= "Subject: ".$_POST["subject"]."\n\n"; $msg .= "Message: ".$_POST["message"]."\n\n"; $ok=mail($sendTo, $subject, $msg, $headers); I cant believe you paid for this! Quote Link to comment https://forums.phpfreaks.com/topic/123265-phpxml-form-problem/#findComment-636589 Share on other sites More sharing options...
julieb Posted September 8, 2008 Author Share Posted September 8, 2008 I copied over this in my php with your code. <?php error_reporting(0); //define the destination recipient of all the incoming mails here $sendTo="dezignstuff@gmail.com"; $name=$_POST["name"]; $email=$_POST["email"]; $phone=$_POST["phone"]; $subject=$_POST["subject"]; $message=$_POST["message"]; $headers = "From: \"".$name."\" <".$email.">\n"; //$headers .= "To: <".$sendTo.">\n"; $headers .= "Reply-To: <".$email.">\n"; $headers .= "Return-Path: <".$email.">\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: text/HTML; charset=ISO-8859-1\n"; if($error)exit(); $msg = "Name: ".$_POST["name"]."\n\n"; $msg .= "Email: ".$_POST["email"]."\n\n"; $msg .= "Phone: ".$_POST["phone"]."\n\n"; $msg .= "Subject: ".$_POST["subject"]."\n\n"; $msg .= "Message: ".$_POST["message"]."\n\n"; $ok=mail($sendTo, $subject, $msg, $headers); if($ok)echo "result=message sent.";else echo "result=message not sent."; ?> but for some reason I am not getting an email now. Not sure what I did wrong???? Quote Link to comment https://forums.phpfreaks.com/topic/123265-phpxml-form-problem/#findComment-636598 Share on other sites More sharing options...
julieb Posted September 8, 2008 Author Share Posted September 8, 2008 This is how I have it now, but didn't make changes until I resolved the issue of the text field responses. http://webdesignz.net/form/index.html Quote Link to comment https://forums.phpfreaks.com/topic/123265-phpxml-form-problem/#findComment-636602 Share on other sites More sharing options...
julieb Posted September 8, 2008 Author Share Posted September 8, 2008 it's working now!!!!! Thank you so much!! I really need to learn this stuff!! I am trying to learn flash.. Any suggestions on where the easy understandable tutorials are for php? I have Dreamweaver, I know it has php stuff in it but do you think that is enough to get the jest of php??? i am so glad I came across this forum. I am sure I will learn alot from here. Quote Link to comment https://forums.phpfreaks.com/topic/123265-phpxml-form-problem/#findComment-636606 Share on other sites More sharing options...
julieb Posted September 8, 2008 Author Share Posted September 8, 2008 sorry for talking so much... is there a code where I can make the email address validated?? I have another form so wasn't sure if I could just add part of that code into this ... oh that wont work because the contact form is merged with a flash file and the code for the validations is in the action script for the contact form. grrr....LOL! Quote Link to comment https://forums.phpfreaks.com/topic/123265-phpxml-form-problem/#findComment-636611 Share on other sites More sharing options...
JonnoTheDev Posted September 8, 2008 Share Posted September 8, 2008 You require a non flash php file to validate email addresses entered. You would need to save the addresses into a database. Email addresses are validated when a user clicks the link in the validation email and this will perform a lookup in the database, setting a flag if the record is valid. You then only send future emails to validated addresses. Quote Link to comment https://forums.phpfreaks.com/topic/123265-phpxml-form-problem/#findComment-636669 Share on other sites More sharing options...
julieb Posted September 8, 2008 Author Share Posted September 8, 2008 Oh, I didnt see anything in my php for that. But I did see in the flash file on my other contact form where it shows the verifying codes for the email address. Maybe I used the wrong word...I meant verify? Not sure what you mean by non flash php. But I will learn. Thank you... Julie Quote Link to comment https://forums.phpfreaks.com/topic/123265-phpxml-form-problem/#findComment-636695 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.