Re: PHP Syntax - mail statement

From: Date: Sat, 23 Nov 2002 23:03:30 +0000
Subject: Re: PHP Syntax - mail statement
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-125752@lists.php.net to get a copy of this message
Probably just a problem with register_globals Try: $contents = "{$_REQUEST['firstname']}, {$_REQUEST['lastname']}, {$_REQUEST['email']}"; Marco ------------ php|architect - The magazine for PHP Professionals The monthly worldwide magazine dedicated to PHP programmers Check us out on the web at http://www.phparch.com On Sat, 2002-11-23 at 18:13, Michael Sharp wrote: > I have a html form that has just 3 fields and each are defined as > name="firstname", name="lastname", and name="email" . The action > is > calling a sendmail.php file and the method is POST. Here is the contents > of sendmail.php: > > <?php > $to = "me@mydomain.org"; > $subject = "Form Submission"; > $contents = "$firstname, $lastname, $email"; > mail ($to, $subject, $contents); > header ("Location: > http://probsd.org/rlewis/thankyou.txt"); > ?> > > When submitting the form, mail gets sent to me@mydomain.org with the > subject defined in sendmail.php, but the contents simply displayes both of > the commas from $contents = and not $firstname, $lastname, and $email. > > Syntax error or what? > > Michael > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#125752) next »