Re: defined

From: Date: Sun, 26 Feb 2006 03:27:17 +0000
Subject: Re: defined
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-231089@lists.php.net to get a copy of this message
On Sat, February 25, 2006 4:18 pm, sub@drewpydraws.com wrote: > I'm having kind of a weird problem I want $MailSubject to contain a > the value "prayer" unless I tell it other wise. > > // on a form processor. > $MailSubject = "Praise"; > include_once("mailit.php"); > > // then in mailit.php > include "form2mail.php"; > > // and in formtomail.php > if(!defined($MailSubject)) // This is the problem line defined checks for CONSTANTS, not variables. You may want http://php.net/isset Or maybe you want if ($MailSubject == "") But for sure you don't want defined. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#231089) next »