Re: [PHP-DB] PHP how to compare?

2001-03-15 Thread Joe Brown
No, two is a more accurate comparison. !== Although for most cases != is sufficient. ""Richard S. Crawford"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > use just one = sign. So, > > if ($PASS != $PASSNOG) {... > > > At 01:41 AM 3/15/01 +0100, Duky wrote: >

Re: [PHP-DB] PHP how to compare?

2001-03-14 Thread Richard S. Crawford
use just one = sign. So, if ($PASS != $PASSNOG) {... At 01:41 AM 3/15/01 +0100, Duky wrote: >Hmm.. maybe I wasn't clear enough... what I want is to check is WHEN the >two passwords aren't the same, then it should echo "password doesn't >match!". So when NOT the same, then echo. What to use for

Re: [PHP-DB] PHP how to compare?

2001-03-14 Thread Duky
Hmm.. maybe I wasn't clear enough... what I want is to check is WHEN the two passwords aren't the same, then it should echo "password doesn't match!". So when NOT the same, then echo. What to use for the NOT?? should it then be something like this with the exlamationmark? if ($PASS !== $P

Re: [PHP-DB] PHP how to compare?

2001-03-14 Thread Terry Romine
even better to use: echo("\$PASS = $PASS\$PASSNOG = $PASSNOG"); which will show the variable name whether it has anything defined or not. Terry On Wednesday, March 14, 2001, at 03:21 PM, Ivo Stoykov wrote: > Hi Duky > > Try to add this before if statement >echo("$PASS$PASSNOG");

Re: [PHP-DB] PHP how to compare?

2001-03-14 Thread Ron Brogden
At 10:21 PM 3/14/2001 +0100, Ivo Stoykov wrote: >Try to add this before if statement >echo("$PASS$PASSNOG"); A more accurate way to tell this would be to do the following: echo "\"".$PASS."\",\"",$PASSNOG,"\"\n"; This was you will see embedded spaces and carriage returns which will not be

Re: [PHP-DB] PHP how to compare?

2001-03-14 Thread Ivo Stoykov
Hi Duky Try to add this before if statement echo("$PASS$PASSNOG"); it will show you whether your vars are correct and whether there is something in at all! if ($PASS != $PASSNOG) { echo "password doesn't match! $back"; exit; } Good luck Ivo "Duky" <[EMAIL PROTECTED]> w

Re: [PHP-DB] PHP how to compare?

2001-03-14 Thread Duky
The variables are the right ones... "Fabio Ottolini (EDB)" wrote: > > Duky, > > Did you check if you have named correctly your variables in your form? Your >statement is more than corret. Try "echoing" your variables before making the >comparision to verify if they are set. If not probabily y

RE: [PHP-DB] PHP how to compare?

2001-03-14 Thread Fabio Ottolini (EDB)
Duky, Did you check if you have named correctly your variables in your form? Your statement is more than corret. Try "echoing" your variables before making the comparision to verify if they are set. If not probabily you have a spelling problem on the form variables. BR, Fábio Ottolini P.S.:

Re: [PHP-DB] PHP how to compare?

2001-03-14 Thread Duky
Ànd what statement for not matching? this maybe? if ($PASS !== $PASSNOG) { # do whatever. } Duky Duky wrote: > > Can somebody tell me what the proper statement is for this? I want two > variables to match with eachother but this doesn't seems to work. Help > please? THNX > >if

RE: [PHP-DB] PHP how to compare?

2001-03-14 Thread Hoover, Josh
I'm assuming these are strings you are comparing, correct? If so, try this: if(strcmp($PASS, $PASSNOG)) { echo "password doesn't match! $back"; exit; } http://www.php.net/manual/en/function.strcmp.php Josh Hoover KnowledgeStorm, Inc. [EMAIL PROTECTED] Searching for a new IT s

RE: [PHP-DB] PHP how to compare?

2001-03-14 Thread Oson, Chris M.
Duky, Have you tried to use: if ($PASS == $PASSNOG) { # do whatever. } If you're taking data from a form, you might want to do a trim to remove any trailing spaces if ($PASS == trim($PASSNOG)) { # do whatever } There's also... http://www.php.net/manual/en/function.str