Re: Function / String Problem
| From: | Shawn Blaylock | Date: | Fri, 19 Jan 2001 17:21:26 +0000 |
| Subject: | Re: Function / String Problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-35646@lists.php.net to get a copy of this message | ||
Try this:
echo "<br><br>...are you logged in: " . LoggedIn() .
"<br><br>";
The reason it wasn't working is because it thought LoggedIn was a
variable and () was part of the echo statement.
"Karl J. Stubsjoen" wrote:
>
> Okay, what is wrong with this:
>
> echo "<br><br>...are you logged in:
> $LoggedIn()<br><br>";
> // outputs: ...are you logged in: ()
>
> Function is:
> function LoggedIn(){
> global $HTTP_POST_VARS
> if ($HTTP_POST_VARS["Login"] == "PHPIsCool")
> {return "YES";}
> else
> {return "NO";}
> }
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Shawn Blaylock, ClipperNet Software Engineer
shawnb@clipper.net
http://www.clipper.net/
Eugene OR 541-431-3360 x406
Toll Free 866-673-6260 x406