<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-852035637457294366</id><updated>2012-02-16T12:37:35.786-08:00</updated><title type='text'>member area</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://member-area-riaq.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/852035637457294366/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://member-area-riaq.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>RiaQ</name><uri>http://www.blogger.com/profile/02219056924149750665</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-852035637457294366.post-219095063303504332</id><published>2009-01-28T09:04:00.001-08:00</published><updated>2009-01-28T09:04:29.589-08:00</updated><title type='text'></title><content type='html'>&lt;?php &lt;br /&gt;// Connects to your Database &lt;br /&gt;mysql_connect("your.hostaddress.com", "username", "password") or die(mysql_error()); &lt;br /&gt;mysql_select_db("Database_Name") or die(mysql_error()); &lt;br /&gt;&lt;br /&gt;//checks cookies to make sure they are logged in &lt;br /&gt;if(isset($_COOKIE['ID_my_site'])) &lt;br /&gt;{ &lt;br /&gt;$username = $_COOKIE['ID_my_site']; &lt;br /&gt;$pass = $_COOKIE['Key_my_site']; &lt;br /&gt;$check = mysql_query("SELECT * FROM users WHERE username = '$username'")or die(mysql_error()); &lt;br /&gt;while($info = mysql_fetch_array( $check )) &lt;br /&gt;{ &lt;br /&gt;&lt;br /&gt;//if the cookie has the wrong password, they are taken to the login page &lt;br /&gt;if ($pass != $info['password']) &lt;br /&gt;{ header("Location: login.php"); &lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;//otherwise they are shown the admin area &lt;br /&gt;else &lt;br /&gt;{ &lt;br /&gt;echo "Admin Area&lt;p&gt;"; &lt;br /&gt;echo "Your Content&lt;p&gt;"; &lt;br /&gt;echo "&lt;a href=logout.php&gt;Logout&lt;/a&gt;"; &lt;br /&gt;} &lt;br /&gt;} &lt;br /&gt;} &lt;br /&gt;else &lt;br /&gt;&lt;br /&gt;//if the cookie does not exist, they are taken to the login screen &lt;br /&gt;{ &lt;br /&gt;header("Location: login.php"); &lt;br /&gt;} &lt;br /&gt;?&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/852035637457294366-219095063303504332?l=member-area-riaq.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://member-area-riaq.blogspot.com/feeds/219095063303504332/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://member-area-riaq.blogspot.com/2009/01/php-connects-to-your-database.html#comment-form' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/852035637457294366/posts/default/219095063303504332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/852035637457294366/posts/default/219095063303504332'/><link rel='alternate' type='text/html' href='http://member-area-riaq.blogspot.com/2009/01/php-connects-to-your-database.html' title=''/><author><name>RiaQ</name><uri>http://www.blogger.com/profile/02219056924149750665</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
