RE: [PHP] Mail function

From: Date: Tue, 27 May 2003 03:10:40 +0000
Subject: RE: [PHP] Mail function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-149041@lists.php.net to get a copy of this message
When passing variables which are objects or indexes from an array you need to wrap them in { } .. i.e. "$foo is cool" <-- acceptable "$_POST['foo'] is cool" <-- Not acceptable "{$_POST['foo']} is cool" <-- correct way. John -----Original Message----- From: Steven Farrier [mailto:webmaster@xke.com] Sent: Monday, May 26, 2003 8:06 PM To: php-general@lists.php.net Subject: [PHP] Mail function I have change server which has new version of php requiring use of $_POST for form stuff. I changed a mail I did in my from to this new format mail("<fake@address.com>", "Mail from form!", "$_POST["first_name"] $_POST["last_name"]\n$_POST["address"]\n$_POST["city"] $_POST["state"] $_POST["zip"]\n$_POST["country"]\n$_POST["email"]\n$_POST["design"]\n$_P OST[ "comments"]", "From: $_POST["first_name"] $_POST["last_name"] <$_POST["email"]>\nReply-To: $_POST["email"]\nX-Mailer: PHP/" . phpversion()); PHP totally chokes on this, the page doesn't even show. I am sure I doing something wrong could you tell me what it is. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#149041) next »