Re: defined

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

 



Well ain't that a kick in the pants? Works great now, thanks. And now I see
the difference between empty() and defined().

Again, many thanks,

~Drew
www.drewpydraws.com

----- Original Message ----- 
From: "Philip Hallstrom" <php@xxxxxxxxxxxxxxx>
To: <sub@xxxxxxxxxxxxxxx>
Cc: <php-general@xxxxxxxxxxxxx>
Sent: Saturday, February 25, 2006 3:27 PM
Subject: Re:  defined


>
> > 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
> > {
> >   $MailSubject = "Prayer";
> > }
> >
> > The problem I believe is with the defined function check. (I think) the
> > value of $MailSubject is maintained to the end so I'm don't think it to
> > be a scope issue, but also, if I don't assign a value to it it should be
> > running the if() statement, but it's not.
> >
> > Any thoughts?
>
> Try...  if (empty($MailSubject)
>
> -philip
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.375 / Virus Database: 268.1.0/269 - Release Date: 2/24/2006
>
>

-- 
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