i have a form and after validation all its information is stored in one variable then passed to a hidden field named 'allInfo'. here is my code with comments explaining the problem the emails i receive after processing. (i just started learning php last night, which should explain the looks of things)
$recipient = "email@example.com";
$subject = "Order";
$message = " Name: $name\n Email: $email\n Order: $order\n Phone: $phone\n";
$from = "$email";
mail($recipient,$subject,$message,$from); //everything Except $order (my most important field) is emailed to me
echo($order); //yet it echoes perfectly!
my inbox gets:
From: Nobody To:firstname.lastname@example.org Subject: Order
the email entered in the form, as a link
Name: the name entered
Email: the email entered, as a link
Phone: the number entered
please help, im completely baffled.
i dont believe this should mean anything but 'allInfo' is the only hidden field on my form.
and if youre feeling generous, why is the From: field in my email always Nobody?