how do I set the superglobals on a simple email form like the one below?
My sysadmin refuses to enable the register_globals (it defaults to off) When forms are filled out and sent, I see only the subject, from, to on the email headers but the sender's form information sender_email, message and sender_name never show through.
He explained that their is a line of code called a superglobal that can enable this and make the form work correctly.
<?
$msg = "email sent from WWW\n";
$msg .= "Sender's Name: \$sender_name\n";
$msg .= "Sender's Email: \$sender_email\n";
$msg .= "Message: \$message\n";
$to = "me@website.com";
$subject = "Web Site feedback form";
$mailheaders = "From: My Web Site\n";
$mailheaders .= "Reply-To: $sender_email\n\n";
mail ($to, $subject, $msg, $mailheaders);
?>
form.php is taken from a book that I am reading, it is suppoed to email me the results of the senders email, senders name and the message. The form.htm is fine and has the same exact names for this *.php one.
All I get are email headers. No sender info.
Any help is very appreciated.
New php learner.
Jaime
Need help with globals / superglobals / register_globals ...
Moderator: General Moderators
please read: Sticky: Before Post Read: Concerning Passing Variables in PHP 4.2+
it's not a sticky thread for nothing
it's not a sticky thread for nothing
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Please, it helps everyone to help if you keep all your questions on the same topic in one thread.
Anyone now wishing to help could you please go here:
viewtopic.php?p=27723#27723
Mac
Anyone now wishing to help could you please go here:
viewtopic.php?p=27723#27723
Mac