Re: [PHP] problem with my login script

2012-10-02 Thread Rodrigo Silva dos Santos
Hello Thomas. The if are being evaluated in all iterations of the while, the problem is you didn't stop the loop when it finds what it's searching for. Try putting a break in the end of the if, them, when the condition match, the while will stop. And hey! You're using a lot of legacy code for

Re: [PHP] problem with my login script

2012-10-02 Thread Bálint Horváth
The problem was already solved. I forgot to send a copy to the list... Rodrigo, break!? Ohh man, it's a crazy idea... A developer DOES NOT use break at all (in a loop)... (switch is an exception) In the other hand Thomas, you should use while and count the lines and u need to test if username

Re: [PHP] problem with my login script

2012-10-02 Thread Rodrigo Silva dos Santos
Better solution than mine (that don't even make a code) As a Oo developer, a run away from using switch, so I should never use break too... Good to know. By the way, what's the problem with it? Enviado por Samsung Mobile Bálint Horváth hbal...@gmail.com escreveu: The problem was already

Re: [PHP] problem with my login script

2012-10-02 Thread Bálint Horváth
As a Oo developer, a run away from using switch - I don't understand this: OOP and switch could be good together and I also prefer switch eg. at action or page selection... break is an old stuff and not a nice solution (like goto)... killing a procedure!? -means wrong planning of an app! (and

Re: [PHP] problem with my login script

2012-10-02 Thread Rodrigo Silva dos Santos
Make sense, I haven't ever realizad how old the code appears like when it haves a break. Fell like C. Livin' n' learnin'. Thanks! Enviado por Samsung Mobile Bálint Horváth hbal...@gmail.com escreveu: As a Oo developer, a run away from using switch - I don't understand this: OOP and switch

Re: [PHP] problem with my login script

2012-10-02 Thread Maciek Sokolewicz
On 02-10-2012 11:59, Bálint Horváth wrote: The problem was already solved. I forgot to send a copy to the list... Rodrigo, break!? Ohh man, it's a crazy idea... A developer DOES NOT use break at all (in a loop)... (switch is an exception) I personally find this statement to be utter bullshit.