Mail & Header Redirect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have an email that is sent upon submission of a form.  I need to redirect to a confirmation page if email is sent successfully.  I thought the problem was that my email headers are already being sent, but when I removed them it still did not work.  I need to bcc as well.

headers:

<?php function mailsent(){header("location: http://www.justustwo.com/vals/thankyou.html";);exit();}

And mailing:

/*Mailing*/
   $to="valeriejason@xxxxxxxxxx";
   $subject="AVC received a quote request!";
   $message="
    <H3 align='center'>AVC received a quote request from $name</h3>
     <h4><table cellpadding='5' cellspacing='0' align='center' border='1'>
     <tr>
     <td>Email:</td>
     <td>$email</td>
     </tr>
     <tr>
     <td>Phone:</td>
     <td>$phone</td>
     </tr>
     <tr>
     <td>Indoors/Outdoors:</td>
     <td>$where</td>
     </tr>
     <tr>
     <td>Type of Stock:</td>
     <td>$m</td>
     </tr>
     <tr>
     <td>Quantity:</td>
     <td>$quantity</td>
     </tr>
     <tr>
     <td>Sides:</td>
     <td>$s</td>
     </tr>
     <tr>
     <td>Colors:</td>
     <td>$colors</td>
     </tr>
     <tr>
     <td>Finishing:</td>
     <td>$finish</td>
     </tr>
     <tr>
     <td>Comments:</td>
     <td>$c</td>
     </tr>
     </table></h4>";

   /* set the Content-type header. */
   $headers  = "MIME-Version: 1.0\n";
   $headers .= "Content-type: text/html; charset=iso-8859-1\n\r";
   /* additional headers */
   $headers .= "From:AVCQuoteRequest";
   $headers .= "Bcc: valerie1230@xxxxxxxxxx";
   $sent=mail($to,$subject,$message,$headers);
   if ($sent) {
    mailsent();
   }
   else {
    $errormessage="<h2 class=\"error2\">**There was an error. Please call 1-800-548-4449</h2>";
    echo $errormessage;
    exit;
   }
 

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux