pioneerx01 Posted October 11, 2010 Share Posted October 11, 2010 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: myemail@gmail.com\r\n"; $headers .= "BCC: otheremail@gmail.com\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? Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted October 11, 2010 Share Posted October 11, 2010 what is this supposed to do? $_POST[''] is empty. don't put quotes around $_POST[zip], which I prefer to write with single-quotes: $_POST['zip'] Quote Link to comment Share on other sites More sharing options...
chmpdog Posted October 11, 2010 Share Posted October 11, 2010 Find your php.ini file and make sure you have error reporting on and set to error_reporting = E_ALL | E_STRICT this is about line 515 in my ini file. This will report all errors and help you trouble shoot your code! Quote Link to comment Share on other sites More sharing options...
pioneerx01 Posted October 11, 2010 Author Share Posted October 11, 2010 I am afraid that did not do anything for my issue. I am still having same problem. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.