<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: How to make secure login script using mysql?</title> <atom:link href="http://www.findistore.com/how-to-make-secure-login-script-using-mysql/feed" rel="self" type="application/rss+xml" /><link>http://www.findistore.com/how-to-make-secure-login-script-using-mysql</link> <description>We are Professional Web Designer. We specialize in Website Design &#38; eCommerce Web Services</description> <lastBuildDate>Wed, 12 Oct 2011 00:03:14 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /> <item><title>By: bo.echo</title><link>http://www.findistore.com/how-to-make-secure-login-script-using-mysql/comment-page-1#comment-1094</link> <dc:creator>bo.echo</dc:creator> <pubDate>Mon, 23 Feb 2009 03:31:06 +0000</pubDate> <guid
isPermaLink="false">http://www.findistore.com/how-to-make-secure-login-script-using-mysql#comment-1094</guid> <description>most of the script will be done on the web server (php, asp, or whatever).  You just connect to the mysql database to store the information and to compare the entered password to the one in the database.  You do not store the password as clear text.  You make a Sha-1 hash of the password, store that in the database, then when a person logs in, you do a sha-1 hash of the password they just entered and compare it to the hash in the database.  If they match, you let the user in.  Now, here is some important stuff.
You need to set a cookie in the user&#039;s browser to identify them when they move to another page.  You give them a random LONG number as a cookie, then add that number to another &quot;session&quot; database that&#039;s used to know who has already logged in.  When they go to another page, you grab the cookie that they send and see if it is in the &quot;session database&quot;.  If it is, allow them to see the page.  If it is not, redirect them to the login page.  When they log out, delete the number from the database and also from their cookie.</description> <content:encoded><![CDATA[<p>most of the script will be done on the web server (php, asp, or whatever).  You just connect to the mysql database to store the information and to compare the entered password to the one in the database.  You do not store the password as clear text.  You make a Sha-1 hash of the password, store that in the database, then when a person logs in, you do a sha-1 hash of the password they just entered and compare it to the hash in the database.  If they match, you let the user in.  Now, here is some important stuff.</p><p>You need to set a cookie in the user&#8217;s browser to identify them when they move to another page.  You give them a random LONG number as a cookie, then add that number to another &#8220;session&#8221; database that&#8217;s used to know who has already logged in.  When they go to another page, you grab the cookie that they send and see if it is in the &#8220;session database&#8221;.  If it is, allow them to see the page.  If it is not, redirect them to the login page.  When they log out, delete the number from the database and also from their cookie.</p> ]]></content:encoded> </item> </channel> </rss>
