note 28695 rejected from language.variables.predefined by tix
| From: | tix@php.net | Date: | Tue, 21 Jan 2003 07:28:09 +0000 |
| Subject: | note 28695 rejected from language.variables.predefined by tix | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-42510@lists.php.net to get a copy of this message | ||
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);
?>
Any help is very appreciated.
New php learner.
Jaime