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 o

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 fou

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 escreveu: The problem was already solved. I forgot to se

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 escreveu: "As a Oo developer, a run away from using switch" - I don't understand this: OOP and switch could be good toge

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.

[PHP] Re: problem with my login script

2012-10-02 Thread Tim Streater
On 02 Oct 2012 at 12:07, Maciek Sokolewicz wrote: > 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 excep

RES: [PHP] Re: problem with my login script

2012-10-02 Thread Samuel Lopes Grigolato
I follow this rule of thumb: small blocks of highly understandable code. If this demands ternary conditionals or breaks, so be it! -Mensagem original- De: Tim Streater [mailto:t...@clothears.org.uk] Enviada em: terça-feira, 2 de outubro de 2012 08:37 Para: PHP General List Assunto: [PHP]

Re: RES: [PHP] Re: problem with my login script

2012-10-02 Thread ma...@behnke.biz
Just for the record, I'll sign that one. There is a reason for continue, break and return to exist. Just make sure, that your code is understandable and there is no problem using these exits. If your code is that complicated, that you don't understand a break in it, the problem is another. Samue

Re: RES: [PHP] Re: problem with my login script

2012-10-02 Thread Thomas Conrad
My problem was solved no need to argue. I don't see why use a while loop with a count variable when it produces the same result as a foreach loop. As for using a break in the loop, I could add it but the loop is gonna stop anyway as soon as it hits the end of the array. I also didn't see the point

Re: [PHP] Re: problem with my login script

2012-10-02 Thread Rodrigo Silva dos Santos
To break or not to break? that's the question... All that fight makes me (and, I think that Thomas too) learn a bit more about all of this. And for finish with all of it. I think that if something is not deprecated, is because it's is a good idea to use it somewhere. If the Language develope

[PHP] base64_decode

2012-10-02 Thread John Taylor-Johnston
Without anyone infecting their machines, can someone tell me what this is? I found a phishing site on my DreamHost server. DreamHost has been very helpful. We found a file containing this code. What is it? What does it contain? eval(base64_decode('Pz4gPC9kaXY+DQo8ZGl2IGlkPSJmb290ZXIiPjxhIGhyZWY

Re: [PHP] base64_decode

2012-10-02 Thread Rodrigo Silva dos Santos
Hello John. This code generates the following html: ?> http://web-hosting-click.com/"; title="Web hosting">Web hosting Without anyone infecting their machines, can someone tell me what this is? I found a phishing site on my DreamHost server. DreamHost has been very helpful. We found

Re: [PHP] base64_decode

2012-10-02 Thread Sebastian Krebs
Am 02.10.2012 19:27, schrieb John Taylor-Johnston: Without anyone infecting their machines, can someone tell me what this is? I found a phishing site on my DreamHost server. DreamHost has been very helpful. We found a file containing this code. What is it? What does it contain? http://codep

[PHP] Re: {ATTENTION} Re: [PHP] base64_decode

2012-10-02 Thread John Taylor-Johnston
Interesting. Thanks. It was a footer.php in a webpress theme. I was wondering if it was a portal someone was using to get onto my server. I changted ftp passwords and begun using sftp, but phishing code is still leaking onto my sites. My wordpress copies are up to date and DreamHost has no real

RES: [PHP] Re: {ATTENTION} Re: [PHP] base64_decode

2012-10-02 Thread Samuel Lopes Grigolato
Another way to decode and inspect such data is to use utilities like: http://www.motobit.com/util/base64-decoder-encoder.asp By the way, never saw before this kind of sloppy irritating malicious "obfuscation" =). Does your server allow execution of the "eval" function? I consider this a security

Re: RES: [PHP] Re: {ATTENTION} Re: [PHP] base64_decode

2012-10-02 Thread Ashley Sheridan
On Tue, 2012-10-02 at 15:04 -0300, Samuel Lopes Grigolato wrote: > Another way to decode and inspect such data is to use utilities like: > http://www.motobit.com/util/base64-decoder-encoder.asp > > By the way, never saw before this kind of sloppy irritating malicious > "obfuscation" =). > > Doe