Re: [PHP] Simple If-else statement - Fixed

2001-03-27 Thread Johannes Janson
Hi, for the haeder just make sure that there is NO output whatsoever before the header-call. even if line 1 of your script is empty before the schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Thanks for all the help. I finally got it to work. I ended up using a bunch > of if

Re: [PHP] Simple If-else statement - Fixed

2001-03-27 Thread Louis Brooks
Thanks for all the help. I finally got it to work. I ended up using a bunch of if ($lname=="") { statements instead of if (($lname=="") || ($fname=="")) { and that seems to be working. I still can't get the header() statement to work. So I just cheated and put in some text telling the user to

Re: [PHP] Simple If-else statement

2001-03-27 Thread Johannes Janson
Hi Louis, you cuold try it with if (empty($fname)) { redirect... just check again that your form is ok. Johannes "Louis Brooks" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Thanks for everyone's response. I am still not able to get the > > if(($fname

Re: [PHP] Simple If-else statement

2001-03-27 Thread Sterling
H- Really, that's strange. Try printing out your variables and seeing what is actually being passed. print "FNAME:$fname:\n"; With the : : colons surrounding your variable you can see what if anything is actually in $fname. Also it might have been a typo on your part but be sure to check f

Re: [PHP] Simple If-else statement

2001-03-27 Thread Louis Brooks
Thanks for everyone's response. I am still not able to get the if(($fname="")) { statement to work even with the suggestions everyone made so I am beginning to wonder if it is a problem with the server. (It is php3 on an Apache server. ) Any other suggestions would be greatly appreciated. Tha

Re: [PHP] Simple If-else statement

2001-03-27 Thread Sterling
H- Another solution might be to use javascript to check the fields before the page is even submitted to make sure they put "something" in the first and last name fields. Unfortunately I'm not a javascript person but I've seen it done so much I'm sure you could find examples on the web or via a

Re: [PHP] Simple If-else statement

2001-03-27 Thread Johannes Janson
Hi, if ($name == " ") { checks for a space in $name. "empty" is either if (§name == "") without a free space between "" or you could do it with empty($mane) if (empty($name)) is true if it is empty (who would have thought this?) Johannes "Louis Brooks" <[EMAIL PROTECTED]> schrieb im Newsbe

RE: [PHP] Simple If-else statement

2001-03-27 Thread Johnson, Kirk
This code is checking if $fname and $lname are equal to a single blank character. Is this what you want? My guess is you really want if(($fname == "") || ($lname == "")) Another way to write this is if( (!$fname) || (!$lname) ) Kirk > -Original Message- > From: Louis