MCSESubnet
Members-
Content Count
5 -
Joined
-
Last visited
Everything posted by MCSESubnet
-
Php Simple Login Tutorial Learn how to make a simple login
MCSESubnet replied to HmmZ's topic in General Discussion
Here is the MD5 alternative: <?PHP $user_name = $_POST['u_name']; $password = $_POST['pass']; //db connection string $db = mysql_connect("localhost","root","pass"); mysql_select_db("my_database",$db); //replace the above values with your actual database val //We will now retrive the password from the database $sql_query = mysql_query("SELECT password FROM user_data WHERE user_name='$user_name'",$db); $rs = mysql_fetch_row($sql_query); //comparing passwords Note before we can compare the password we use md5() to encrypt the $password becuase the password that we retrive from the database is in the encrypted form. if(md5($password) != $rs[0]) echo "ERROR: Invalid User"; else echo "Congrats, Password is correct!"; ?> ( I pulled this off http://www.phpbuddy.com/ ) Although this shows you how fast and easy it is to use MD5 and personally I prefer it over PEAR -
If you find yourself unable to use javascript, or desire an alternative. I would suggest using CSS. here is the basic idea of what you need in your CSS entry. link_text {/*make the link text transparent*/ visibility: hidden; }.link_href {/*Display this image in the link area*/ background: url(imagepath/mouseout_button.gif) no-repeat; } .link_href:hover {/*Display this image in the link area when you mouseover*/ background: url(imagepath/mouseover_button.gif) no-repeat; }
-
Previous statements were actually incorrect. I spend the majority of my day running hash crackers in order to determing better ways of securing passwords. Here is an article of how to make your passwords more secure, but there are multiple ways to break a MD5 hash. Infact there is no such thing as a unsecure password. Given enough time all are breakable. Read the article (no I didn't write it), and stop believing myths. https://www.symantec.com/connect/articles/ten-windows-password-myths His best suggestion is to use spaces. This alone will increase the time it takes to reveal your password by 10 fold if not better.