Hi all,
I am trying to perform the following code to isert the data in my database and receive an e-mail :
[code=php]
include (“intro.php”);
$first_name=$_POST[‘first_name’];
$last_name=$_POST[‘last_name’];
$email=$_POST[’email’];
$sql=”insert into reservation(first_name,last_name,email,)
values(‘$first_name’,’$last_name’,’$email’)”;
if(mysql_errno() == 0){
//add the user.
header(‘location:register.php’);
} else {
echo”<div align=’center’><strong><font color=’#003333′ size=’4′>Already existing user !! Please try another user name !!</font></strong>”;
};
?>
<?
$message =”<html>’$first_name'<br>,’$last_name'<br>,’$email’,</html>”;
$headers = ‘From: info@’ . $_SERVER[‘?’] . “rn” .
‘X-Mailer: PHP/’ . phpversion();
$ok=mysql_query($sql,$conexao);
IF($ok){
mail(‘[email protected]’, ‘Request’,$headers,$message);}
The problem is that when I receive the e-mail, the sender is [email][email protected]
[code=php]$message =”<html>’$first_name'<br>,’$last_name'<br>,’$email’,</html>”;
Thanks for any help
sandro27