You are here: Re: [PHP] Re: Select and $_POST « PHP « IT news, forums, messages
Re: [PHP] Re: Select and $_POST

Posted by Chris Shiflett on 10/12/43 11:31

Ben Ramsey wrote:
> $clean = array();
> $sql = array();

Glad to see someone spreading this habit. :-) Thanks, Ben.

> if (ctype_alnum($_POST['pass']))
> {
> $clean['pass'] = $_POST['pass'];
> }

I think it's fine to cheat a bit with the password and trust the output
format of md5():

$clean['pass'] = md5($_POST['pass']);

Of course, it is best to use a salt:

$salt = 'SHIFLETT';
$clean['pass'] = md5($salt . md5($_POST['pass'] . $salt));

Chris

--
Chris Shiflett
Brain Bulb, The PHP Consultancy
http://brainbulb.com/

 

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

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