Jump to content

2nd email line doesn't work


Recommended Posts

Hello,

 

I've a graphic artist working on a web site with a contact form that posts to this php file. The first email to the admin works but the 2nd email back to the customer doesn't. What am I missing? I'm a total beginner.

 

thanks very much David

 

<?php

@extract($_POST);

$require = "name,email,shedCity,select";

$name = stripslashes($name);

$email = stripslashes($email);

$phone = stripslashes($phone);

$mailing = stripslashes($mailing);

$comments = stripslashes($comments);

$adminaddress = "[email protected]";

$siteaddress ="http://www.californiacustomsheds.com";

$sitename = "California Custom Sheds";

$date = date("m/d/Y H:i:s");

 

if ($REMOTE_ADDR == "") $ip = "no ip";

else $ip = getHostByAddr($REMOTE_ADDR);

 

$dcheck = explode(",",$require);

while(list($check) = each($dcheck)) {

if(!$$dcheck[$check]) {

$error .= "Missing $dcheck[$check]<BR>";

}

}

 

 

if($error) {

?>

<P><CENTER><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">

  <TR>

    <TD WIDTH="100%" BGCOLOR="#004080">

    <TABLE WIDTH="394" BORDER="0" CELLSPACING="1" CELLPADDING="2">

      <TR>

        <TD WIDTH="26%" BGCOLOR="#004080">

        <P><B><FONT COLOR="#ffffff" SIZE="-1" FACE="Verdana">Error</FONT></B></TD>

      </TR>

  <TR>

        <TD WIDTH="26%" BGCOLOR="#ffffff">

        <FONT COLOR="#000000" SIZE="-1" FACE="Verdana"><?php echo $error; ?></FONT></TD>

      </TR>

    </TABLE></TD>

  </TR>

</TABLE></CENTER>

 

<script type="text/javascript">

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");

document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

</script>

<script type="text/javascript">

try {

var pageTracker = _gat._getTracker("UA-6607459-1");

pageTracker._trackPageview();

} catch(err) {}</script>

</body></HTML>

<?php

exit();

}

 

 

mail($adminaddress,"California Custom Sheds Contact Form",

"A visitor at $sitename has left the following information\n

Name: $name

Telephone: $phone

Email: $email

City where Shed will be Built: $shedCity

Mailing address for catalog: $mailing

Comments: $comments

How did you hear about CCS? $select

Logged Info :

------------------------------

Using: $HTTP_USER_AGENT

Hostname: $ip

IP address: $REMOTE_ADDR

Date/Time:  $date","From: $name <$email>");

 

mail($email,"Thank You for visiting $sitename",

"Hi $fname,\n

Thank you for your interest in $sitename!\n

We will reply to your email shortly.

Cheers,

$sitename

$siteaddress","From: $name <$adminaddress>");

 

header("location:http://www.californiacustomsheds.com");

 

?>

Link to comment
https://forums.phpfreaks.com/topic/156556-2nd-email-line-doesnt-work/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.