Posted by Geoff Muldoon on 11/06/06 04:49
phil.latio@f-in-stupid.co.uk says...
> I am trying to remember how you write an if statement to check if any value
> has been entered. For example seeing if a username has been entered in form.
> I have seen the following:
>
> if ($username == '')
> {
> print ("You've pressed submit without entering your username");
> }
>
> However is there another method which uses an exclamation mark? I am sure I
> have seen something for where $username has no value but I can't think what
> it was.
isSet ??
if (!isSet($username)) { // do this if $username is not set
GM
Navigation:
[Reply to this message]
|