<?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: A Simple Login System with PHP &amp; MySQL</title>
	<atom:link href="http://www.justin-cook.com/wp/2006/06/21/a-simple-login-system-with-php-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.justin-cook.com/wp/2006/06/21/a-simple-login-system-with-php-mysql/</link>
	<description>A web, games, technology, programming and SEO blog by Justin Cook</description>
	<lastBuildDate>Wed, 04 Jan 2012 07:53:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: ashan</title>
		<link>http://www.justin-cook.com/wp/2006/06/21/a-simple-login-system-with-php-mysql/comment-page-1/#comment-154506</link>
		<dc:creator>ashan</dc:creator>
		<pubDate>Tue, 03 Feb 2009 23:51:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.justin-cook.com/wp/2006/06/21/a-simple-login-system-with-php-mysql/#comment-154506</guid>
		<description>$row=mysql_fetch_array(&lt;strong&gt;$rs&lt;/strong&gt;);</description>
		<content:encoded><![CDATA[<p>$row=mysql_fetch_array(<strong>$rs</strong>);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dkt1133</title>
		<link>http://www.justin-cook.com/wp/2006/06/21/a-simple-login-system-with-php-mysql/comment-page-1/#comment-153339</link>
		<dc:creator>dkt1133</dc:creator>
		<pubDate>Tue, 28 Oct 2008 10:38:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.justin-cook.com/wp/2006/06/21/a-simple-login-system-with-php-mysql/#comment-153339</guid>
		<description>// normally you&#039;ll get the username/pass from the $_POST variables from a form
// but for this code we&#039;ll manually create them

$username = &quot;jim&quot;;
$password = &quot;bob&quot;;

$sql=&quot;SELECT * FROM users WHERE login = &#039;&quot;.$username.&quot;&#039; AND password = &#039;&quot;.$password.&quot;&#039;&quot;;

// Execute the SQL statement 
// results stored in the $rs variable.

$rs = mysql_query($sql);

// determine of the mysql_query() was successful

if(!$rs) {
    $err=mysql_error();
    print $err;
    exit();
}

// If was successful, check returned result
// mysql_affected_rows() will return the number of rows affected

if(mysql_affected_rows()==0){
     print &quot;Username/password pair is invalid. Please try again.&quot;;
} else {
     // display last logged in time
     $row=mysql_fetch_array($r);
     $last=$row[&quot;last_logged_in&quot;];
     print &quot;Login successful. (You last logged in at &quot;.$last.&quot;.)&quot;;
}</description>
		<content:encoded><![CDATA[<p>// normally you&#039;ll get the username/pass from the $_POST variables from a form<br />
// but for this code we&#039;ll manually create them</p>
<p>$username = &#034;jim&#034;;<br />
$password = &#034;bob&#034;;</p>
<p>$sql=&#034;SELECT * FROM users WHERE login = &#039;&#034;.$username.&#034;&#039; AND password = &#039;&#034;.$password.&#034;&#039;&#034;;</p>
<p>// Execute the SQL statement<br />
// results stored in the $rs variable.</p>
<p>$rs = mysql_query($sql);</p>
<p>// determine of the mysql_query() was successful</p>
<p>if(!$rs) {<br />
    $err=mysql_error();<br />
    print $err;<br />
    exit();<br />
}</p>
<p>// If was successful, check returned result<br />
// mysql_affected_rows() will return the number of rows affected</p>
<p>if(mysql_affected_rows()==0){<br />
     print &#034;Username/password pair is invalid. Please try again.&#034;;<br />
} else {<br />
     // display last logged in time<br />
     $row=mysql_fetch_array($r);<br />
     $last=$row["last_logged_in"];<br />
     print &#034;Login successful. (You last logged in at &#034;.$last.&#034;.)&#034;;<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
