o_oe Posted April 4, 2008 Share Posted April 4, 2008 Hello friend,The form handler below sends form content to my inbox after the user fills it out.Please how can I make it also send the user a HTML newsletter simultenousely.Thanks for you help.<?phpif($_REQUEST[quest1]&& $_REQUEST == 'second1'){ //print_r($_REQUEST); include("2.htm");exit(); }elseif($_REQUEST[quest2] && $_REQUEST =='second'){ //print_r($_REQUEST); include("3.htm");exit();}elseif($_REQUEST[quest3] && $_REQUEST =='third'){ //print_r($_REQUEST); include("4.htm");exit();//////////Question 3#///////////}elseif($_REQUEST[action]=='email'){ $msg = 'Hello '.$_REQUEST[salute].' '.$_REQUEST[fname].' '.$_REQUEST[lname]; $msg.= '<br><br>'; $msg.= 'thanks:-<br>'; $msg.= 'For visiting our site :- '.$_REQUEST[quest1].'<br>'; $msg.= 'message countinue :-'.$_REQUEST[quest2].'<br>'; $msg.= 'continue :-'.$_REQUEST[quest3].'<br>'; $msg.= '<br><br>'; $msg.= 'continue:-<br>'; $msg.= 'Full Name :'.$_REQUEST[salute].' '.$_REQUEST[fname].' '.$_REQUEST[lname].'<br>'; $msg.= 'Address :'.$_REQUEST[address1].'<br>'; $msg.= 'Suite/Apt.# :'.$_REQUEST[address2].'<br>'; $msg.= 'City :'.$_REQUEST[city].'<br>'; $msg.= 'State :'.$_REQUEST[state].'<br>'; $msg.= 'Zip :'.$_REQUEST[zip].'<br>'; $msg.= 'E-mail :'.$_REQUEST.'<br>'; $msg.= 'Phone :'.$_REQUEST[phone].'<br>'; $to = 'myemail@mysite.com'; $subject = 'Enquiry From mysite.com'; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers.= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; if(mail($to, $subject, $msg, $headers)){ ?> <script language="javascript">window.location.href='form12.htm'</script> <? }else{ ?> <script language="javascript">window.location.href='form13.htm'</script> <? Link to comment Share on other sites More sharing options...
justsomeguy Posted April 4, 2008 Share Posted April 4, 2008 You're already sending one HTML email, it should be pretty easy to send a second one before you redirect. Link to comment Share on other sites More sharing options...
o_oe Posted April 5, 2008 Author Share Posted April 5, 2008 I used this but got an error "Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\www\form.php on line 39"if($send = mail($to, $subject, $msg, $headers)$send2 = mail($to2, $subject2, $autoreply, $headers2)) Link to comment Share on other sites More sharing options...
boen_robot Posted April 5, 2008 Share Posted April 5, 2008 I used this but got an error "Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\www\form.php on line 39"if($send = mail($to, $subject, $msg, $headers)$send2 = mail($to2, $subject2, $autoreply, $headers2))Add parenthesis around your conditions:if($send = mail($to, $subject, $msg, $headers)) {$send2 = mail($to2, $subject2, $autoreply, $headers2);} Link to comment Share on other sites More sharing options...
kv79 Posted April 5, 2008 Share Posted April 5, 2008 Can you tell me , what are you using? which SMTP server ? and which mailer ? or you have it together in one software ?Please tell me if you do not know , what I mean to ? Link to comment Share on other sites More sharing options...
o_oe Posted April 8, 2008 Author Share Posted April 8, 2008 Add parenthesis around your conditions:Hi,It didn't work with that.Do you have a PHP script that sends confirmation email to user and shows an instruction page (Check your email). In addition to that sends the website administartor an email.Thanks for your time. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.