Re: defined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, February 25, 2006 4:18 pm, sub@xxxxxxxxxxxxxxx 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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux