I have a problem with my php. I’m sure it was working it the past, but sth is wrong now.
The problem is – that this code suppose to send an email msg using form data and it should come from ’email’, so whatever will be typed in field ’email’ should appear as a sender of the incoming message. It doesn’t display it properly, so when I use REPLY button in my outlook it can’t send an email, because it can’t reply to nothing. What could be a problem? is this code ok?
code is here:
$adresdo = "office@tucadomusic.co.uk";
$temat = "Quote from the website";
$zawartosc = "Name: ".$_POST['name']."\n"
."Email: ".$_POST['email']."\n"
."Telephone: ".$_POST['tel']."\n"
."Date: ".$_POST['date']."\n";
if(!$_POST['name'] || !$_POST['tel'] || !$_POST['date']){
header("Location: ../quote.html");
exit;
}
if(mail($adresdo, $temat, $zawartosc, 'From: Contact <'.$email.'>')){
header("Location: ../msg_sent.html");
}
Thanks for any help in advance.
P.
$emailisn’t defined. You need to assign it to something.