You are here: Re: password checking « PHP Programming Language « IT news, forums, messages
Re: password checking

Posted by Jerry Stuckle on 11/18/40 11:42

pieter_hordijk@hotmail.com wrote:
> Why are you using three equal signs?
>
> The following is enough:
> if(($_POST['username'] == 'steven') && ($_POST['password'] ==
> 'crocker'))
>

Three equal signs checks to ensure they are both the same type and the
same value.

Otherwise you can have the potential problem of the user entering a zero
for username and password. PHP could then try to compare as integers
instead of strings - and convert 'steven' and 'crocker' to zero. The
comparison would then be true.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация