Re: PHP: Undefined Variables Error Message
| From: | Jeff - Webmaster | Date: | Thu, 26 Aug 2004 21:47:17 +0000 |
| Subject: | Re: PHP: Undefined Variables Error Message | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-194857@lists.php.net to get a copy of this message | ||
Removing the "." got rid of most of the errors, but two remain:
Notice: Undefined variable: headers in E:\domains\swinos\contact.php on line 4
Notice: Undefined variable: message in E:\domains\swinos\contact.php on line 12
The offending lines are:
4 - $headers = "MIME-Version: 1.0\r\n";
and
12 - $message = stripslashes($message);
Jeff
At 02:32 PM 8/26/2004, Michal Migurski wrote:
Hello all. I just finished placing a new server in production and PHP is not working. I am getting undefined variable messages when trying to submit php based forms. Register Globals is on in php.ini, but it still does not work. I have even tried copying a known-good php.ini from another server and the same behavior exists. I am running IIS in Windows 2000. Any ideas?Another website dies on line 4 here: <?php$to = "joe@joe.com"; $subject = "Swinos.com Booking Contact - $name"; $headers .= "MIME-Version: 1.0\r\n";$headers .= '...';is equivalent to$headers = $headers . '...';So it's probably complaining that $headers is not defined when you're trying to append something to it. Change that first ".=" to a "=", like the line above, and see if that doesn't help. ------------------------------------------------------ michal migurski- contact info and pgp key:sf/ca http://mike.teczno.com/contact.html