Jump to content

I am having trouble incorporating this code...


pioneerx01

Recommended Posts

I have an html form that is submitted to php page that alocated the data to database and automatically sends out selected data to other php page for them to be emailed. Most of it works but final few steps.

 

HTML form code looks like this:

 

<form name="thisform" method="post" action="thankyou.php">

Zip : <input name="zip" type="text" id="zip" size="5" maxlength="5">

<input type="submit" name="submit" value="Submit This Form"/>

 

PHP code has this, amongst others... (thankyou.php)

There is other code there as well and it works...

 

<?php

file_get_contents("http://otherdomain.com/azsef/email.php?zip=$zip");

?>

 

And the email.php has this code:

 

<?php

$headers = "From: [email protected]\r\n";

$headers .= "BCC: [email protected]\r\n";

mail($_POST[''], "email", "

$_POST[zip]

", $headers);

?>

 

When I fill out the form submit it I get to the thankyou.php and all the data is send to the database as well as I get a blank email which can only come from email.php on otherdomain.com. Everything works, but I can not get the zip to be emailed, but I get the email.

 

Why?

 

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.