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: [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? Link to comment https://forums.phpfreaks.com/topic/215582-i-am-having-trouble-incorporating-this-code/ 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'] Link to comment https://forums.phpfreaks.com/topic/215582-i-am-having-trouble-incorporating-this-code/#findComment-1120944 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! Link to comment https://forums.phpfreaks.com/topic/215582-i-am-having-trouble-incorporating-this-code/#findComment-1120958 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. Link to comment https://forums.phpfreaks.com/topic/215582-i-am-having-trouble-incorporating-this-code/#findComment-1121152 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.