Jump to content

[SOLVED] Help: cant solve this IF statement


clown[NOR]

Recommended Posts

I'm trying to check the length of username and password.. but it keeps on returning "Feil lengde" (translation: wrong lenght) .. this is the code:

 

i've tried both this:

if (strlen($tmpUser) > 4 && strlen($tmpUser) < 10 && strlen($tmpPass) > 6 && strlen($tmpPass) < 12) {
echo "Logg inn";
} else { echo "Feil lengde"; }

 

and this:

if ((strlen($tmpUser) > 4) && (strlen($tmpUser) < 10) && (strlen($tmpPass) > 6) && (strlen($tmpPass) < 12)) {
echo "Logg inn";
} else { echo "Feil lengde"; }

 

but with no luck.. any ideas?

 

Thanks In Advance

- Clown

Link to comment
https://forums.phpfreaks.com/topic/48088-solved-help-cant-solve-this-if-statement/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.