rufusbabe Posted January 13, 2008 Share Posted January 13, 2008 Hi. I am new to PHP and have got this code to use for a Feedback form which is based in Flash. I have no idea what to change to get the form sent to my email address. It looks nothing like the tutorials so I am a little stumped! It would be great if someone could have a look and let me know what I have to edit for the script to work. I imported the file I have straight into Adobe GoLive and this is the source code... (the only fields I have in the form is Name, Email Address and Message) <? Error_Reporting(E_ALL & ~E_NOTICE); while ($request = current($_REQUEST)) { if (key($_REQUEST)!='recipient') { $pre_array=split ("&777&", $request); $post_vars[key($_REQUEST)][0]=$pre_array[0]; $post_vars[key($_REQUEST)][1]=$pre_array[1]; } next($_REQUEST); } reset($post_vars); $subject="From ".$post_vars['your_name'][0] ; $headers= "From: ".$post_vars['your_email'][0] ."\n"; $headers.='Content-type: text/html; charset=iso-8859-1'; $message=''; while ($mess = current($post_vars)) { if ((key($post_vars)!="i") && (key($post_vars)!="your_email") && (key($post_vars)!="your_name")) { $message.="<strong>".$mess[1]."</strong> ".$mess[0]."<br>"; } next($post_vars); } mail($_REQUEST['recipient'], $subject, " <html> <head> <title>Contact letter</title> </head> <body> <br> ".$message." </body> </html>" , $headers); echo ("Your message was successfully sent!"); ?> <script> resizeTo(300, 300); </script> THANK YOU!!! Link to comment https://forums.phpfreaks.com/topic/85799-php-coding-help-for-feedback-form/ Share on other sites More sharing options...
revraz Posted January 13, 2008 Share Posted January 13, 2008 This is where it gets set to send to mail($_REQUEST['recipient'], So whatever sets the $_POST/$_GET['recipient'] variable is where it goes. If you want to manually change it and don't know where this gets set, change that above line to your email mail("[email protected]", Link to comment https://forums.phpfreaks.com/topic/85799-php-coding-help-for-feedback-form/#findComment-438068 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.