Re: Mail & Header Redirect

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

 



so try

if ($sent==true) {
   mailsent();
  }

bastien

From: "Valerie" <valerie1230@xxxxxxxxxx>
To: "Bastien Koert" <bastien_k@xxxxxxxxxxx>, <php-db@xxxxxxxxxxxxx>
Subject: Re:  Mail & Header Redirect
Date: Tue, 5 Oct 2004 12:34:27 -0400

When I echo $sent, it returns 1.
Thanks,
Valerie
----- Original Message ----- From: "Bastien Koert" <bastien_k@xxxxxxxxxxx>
To: <Valerie1230@xxxxxxxxxx>; <php-db@xxxxxxxxxxxxx>
Sent: Tuesday, October 05, 2004 10:03 AM
Subject: RE:  Mail & Header Redirect


if you echo $Sent, what do you get?

bastien


From: "Valerie" <valerie1230@xxxxxxxxxx>
To: <php-db@xxxxxxxxxxxxx>
Subject:  Mail & Header Redirect
Date: Tue, 5 Oct 2004 08:24:26 -0400

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;
}



_________________________________________________________________
Scan and help eliminate destructive viruses from your inbound and outbound e-mail and attachments. http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines Start enjoying all the benefits of MSN® Premium right now and get the first two months FREE*.



-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


_________________________________________________________________
Take advantage of powerful junk e-mail filters built on patented Microsoft® SmartScreen Technology. http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines Start enjoying all the benefits of MSN® Premium right now and get the first two months FREE*.


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


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

  Powered by Linux