Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

header using mail funtion 1

Status
Not open for further replies.

dugen

Programmer
Jun 16, 2003
59
US
Hi,

I would like the FROM header to contain the value of $email which is a text box from a form. Im not sure how to format the 5th line of code. Ive been getting all kinds of errors trying to figure this out.
Thanks for the help.


$email = $_REQUEST['txtemail'];
$to2 = "eric@mot.cc";
$subject = "HELLO
$message2 = 'TEST';
$headers2 = "From: $_REQUEST['txtname']";

mail($to2, $subject2, $message2, $headers2);
 
How about:
Code:
$headers2="From: " . $email;



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top