

$hashedpassword = md5($password);
mysql_query("insert into users(name, password, ...) values ("$name", "$hashedpassword", "...");
setcookie("user", "$userid"....);


funman wrote:I do'nt bother with addslashes etc, I use singlequotes in my PHP instead of normal double quotes so I break all possible injections




safety wrote:You will have to get a valid certificate so that browsers using OCSP, Online Certificate Status Protocol, can validate your site. Otherwise users will be warned that your site is possibly stealing info.


Extreme_ wrote:I protect password this way: i store passwords into a file, which is crypted by md5 etc, the file is in directory, which is protected by using htaccess.

<?
if ($Username=="") { Header ("location: loggedoutpage.php"): }

?>

Return to General Webmastering
Users browsing this forum: No registered users and 1 guest