PHP Syntax - mail statement

From: Date: Sat, 23 Nov 2002 23:13:24 +0000
Subject: PHP Syntax - mail statement
Groups: php.general 
Request: Send a blank email to php-general+get-125751@lists.php.net to get a copy of this message
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

« previous php.general (#125751) next »