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: 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?

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.