Re: PHP: Undefined Variables Error Message

From: Date: Thu, 26 Aug 2004 22:53:29 +0000
Subject: Re: PHP: Undefined Variables Error Message
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-194868@lists.php.net to get a copy of this message
On Thu, 26 Aug 2004 14:47:17 -0700, Jeff - Webmaster <webmaster@harbornet.com> wrote: > 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 > if(isset($message)) { > 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 > > > > !DSPAM:412e071553131102431894! > -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin--

« previous php.general (#194868) next »