Re: Re: Select and $_POST

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux