<?xml version="1.0" encoding="iso-8859-1"?><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: Secure PHP login without database</title>
	<atom:link href="http://www.crankberryblog.com/2009/secure-php-login-without-database/feed" rel="self" type="application/rss+xml" />
	<link>http://www.crankberryblog.com/2009/secure-php-login-without-database</link>
	<description>Sharing ideas on web design, development and the internet economy</description>
	<lastBuildDate>Mon, 05 Jul 2010 06:02:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Lil</title>
		<link>http://www.crankberryblog.com/2009/secure-php-login-without-database/comment-page-1#comment-309</link>
		<dc:creator>Lil</dc:creator>
		<pubDate>Wed, 23 Jun 2010 03:19:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.crankberryblog.com/?p=143#comment-309</guid>
		<description>Very useful, thank you.</description>
		<content:encoded><![CDATA[<p>Very useful, thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich</title>
		<link>http://www.crankberryblog.com/2009/secure-php-login-without-database/comment-page-1#comment-291</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Tue, 08 Jun 2010 15:22:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.crankberryblog.com/?p=143#comment-291</guid>
		<description>Hi, sorry for asking a basic question, but is it possible to redirect the users depending on their username to different webpages? Where is it set where the page redirects?

thanks

Rich</description>
		<content:encoded><![CDATA[<p>Hi, sorry for asking a basic question, but is it possible to redirect the users depending on their username to different webpages? Where is it set where the page redirects?</p>
<p>thanks</p>
<p>Rich</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jerry Low</title>
		<link>http://www.crankberryblog.com/2009/secure-php-login-without-database/comment-page-1#comment-277</link>
		<dc:creator>Jerry Low</dc:creator>
		<pubDate>Sun, 30 May 2010 11:09:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.crankberryblog.com/?p=143#comment-277</guid>
		<description>Hey Chris, sessions usually close/terminate by themselves after a short period when the browser closes. I believe if you&#039;re using tabs and you close one tab the session resides. I could be wrong.

That being said, its not quite possible to do so through PHP as PHP is a server side coding and when the browser is terminated the browser doesn&#039;t communicate with the server. So you may have to look into a javascript alternative if you need a full termination of cookies/sessions right at the moment of closing.

-Jerry</description>
		<content:encoded><![CDATA[<p>Hey Chris, sessions usually close/terminate by themselves after a short period when the browser closes. I believe if you&#039;re using tabs and you close one tab the session resides. I could be wrong.</p>
<p>That being said, its not quite possible to do so through PHP as PHP is a server side coding and when the browser is terminated the browser doesn&#039;t communicate with the server. So you may have to look into a javascript alternative if you need a full termination of cookies/sessions right at the moment of closing.</p>
<p>-Jerry</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.crankberryblog.com/2009/secure-php-login-without-database/comment-page-1#comment-272</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Fri, 28 May 2010 13:16:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.crankberryblog.com/?p=143#comment-272</guid>
		<description>Hello Everyone,

I&#039;m new to this site, however I&#039;ve worked out the non-database PHP script.

However, it would be nice if someone could tell me where and what line of code I should add so the session would terminate itself (logout) upon closing the browser window.

Help from anyone is appreciated.
Thank you in advanced.


Chris</description>
		<content:encoded><![CDATA[<p>Hello Everyone,</p>
<p>I&#039;m new to this site, however I&#039;ve worked out the non-database PHP script.</p>
<p>However, it would be nice if someone could tell me where and what line of code I should add so the session would terminate itself (logout) upon closing the browser window.</p>
<p>Help from anyone is appreciated.<br />
Thank you in advanced.</p>
<p>Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kamil</title>
		<link>http://www.crankberryblog.com/2009/secure-php-login-without-database/comment-page-1#comment-249</link>
		<dc:creator>Kamil</dc:creator>
		<pubDate>Sun, 21 Mar 2010 08:57:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.crankberryblog.com/?p=143#comment-249</guid>
		<description>thx;)</description>
		<content:encoded><![CDATA[<p>thx;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jerry Low</title>
		<link>http://www.crankberryblog.com/2009/secure-php-login-without-database/comment-page-1#comment-246</link>
		<dc:creator>Jerry Low</dc:creator>
		<pubDate>Thu, 18 Mar 2010 18:09:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.crankberryblog.com/?p=143#comment-246</guid>
		<description>Kamil the script relies on the PHP header(); function to redirect you after you logged in.

Now the function only works if nothing has been outputted to you browser yet. PHP script will run on the server and won&#039;t output anything to the browser unless you have an echo &#039;&#039;; script. So you can&#039;t have anything like echo &#039;&#039;; before my script.

Or if you included my script after the &lt;html&gt;, &lt;head&gt; or &lt;body&gt; tag it also won&#039;t work. It has to be before that.

Now if you do need to output something before the script then you need to use Javascript for the redirect.</description>
		<content:encoded><![CDATA[<p>Kamil the script relies on the PHP header(); function to redirect you after you logged in.</p>
<p>Now the function only works if nothing has been outputted to you browser yet. PHP script will run on the server and won&#039;t output anything to the browser unless you have an echo &#034;; script. So you can&#039;t have anything like echo &#034;; before my script.</p>
<p>Or if you included my script after the <html>, <head> or <body> tag it also won&#039;t work. It has to be before that.</p>
<p>Now if you do need to output something before the script then you need to use Javascript for the redirect.</body></head></html></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kamil</title>
		<link>http://www.crankberryblog.com/2009/secure-php-login-without-database/comment-page-1#comment-245</link>
		<dc:creator>Kamil</dc:creator>
		<pubDate>Thu, 18 Mar 2010 17:44:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.crankberryblog.com/?p=143#comment-245</guid>
		<description>Do you know what is wrong??? And what is solution this problem? Thx;)

Warning: Cannot modify header information - headers already sent by (output started at /data/www/silentman/w/_login_users.php:1) in /data/www/silentman/w/_login_class.php on line 43

Warning: Cannot modify header information - headers already sent by (output started at /data/www/silentman/w/_login_users.php:1) in /data/www/silentman/w/_login_class.php on line 44

Warning: Cannot modify header information - headers already sent by (output started at /data/www/silentman/w/_login_users.php:1) in /data/www/silentman/w/login.php on line 5</description>
		<content:encoded><![CDATA[<p>Do you know what is wrong??? And what is solution this problem? Thx;)</p>
<p>Warning: Cannot modify header information &#8211; headers already sent by (output started at /data/www/silentman/w/_login_users.php:1) in /data/www/silentman/w/_login_class.php on line 43</p>
<p>Warning: Cannot modify header information &#8211; headers already sent by (output started at /data/www/silentman/w/_login_users.php:1) in /data/www/silentman/w/_login_class.php on line 44</p>
<p>Warning: Cannot modify header information &#8211; headers already sent by (output started at /data/www/silentman/w/_login_users.php:1) in /data/www/silentman/w/login.php on line 5</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Olive</title>
		<link>http://www.crankberryblog.com/2009/secure-php-login-without-database/comment-page-1#comment-239</link>
		<dc:creator>Olive</dc:creator>
		<pubDate>Tue, 09 Mar 2010 02:28:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.crankberryblog.com/?p=143#comment-239</guid>
		<description>Thank you Jerry. This is really great.</description>
		<content:encoded><![CDATA[<p>Thank you Jerry. This is really great.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jerry Low</title>
		<link>http://www.crankberryblog.com/2009/secure-php-login-without-database/comment-page-1#comment-238</link>
		<dc:creator>Jerry Low</dc:creator>
		<pubDate>Mon, 08 Mar 2010 17:42:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.crankberryblog.com/?p=143#comment-238</guid>
		<description>Hey Olive,

1. The $domain code is actually just a unique naming code for your cookies. You just need to put any name. It could be Olive, code, random, or anything you like. It doesn&#039;t affect the pages and operation much.

2. These files are all currently linked together as being in the same directory. They don&#039;t have to be in the root but they have to be in the same folder. You can move them around but you&#039;ll have to change the file pointing to them.

3. You can link to the login from sub directories or have the login in a sub directory and link back. You&#039;ll have to change the path to the files though such as the login and logout php pages.

Hope that helps!</description>
		<content:encoded><![CDATA[<p>Hey Olive,</p>
<p>1. The $domain code is actually just a unique naming code for your cookies. You just need to put any name. It could be Olive, code, random, or anything you like. It doesn&#039;t affect the pages and operation much.</p>
<p>2. These files are all currently linked together as being in the same directory. They don&#039;t have to be in the root but they have to be in the same folder. You can move them around but you&#039;ll have to change the file pointing to them.</p>
<p>3. You can link to the login from sub directories or have the login in a sub directory and link back. You&#039;ll have to change the path to the files though such as the login and logout php pages.</p>
<p>Hope that helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Olive</title>
		<link>http://www.crankberryblog.com/2009/secure-php-login-without-database/comment-page-1#comment-237</link>
		<dc:creator>Olive</dc:creator>
		<pubDate>Mon, 08 Mar 2010 09:07:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.crankberryblog.com/?p=143#comment-237</guid>
		<description>Hi,

Thank you very much for the code.

I have some few questions to ask as below :

1. $domain_code = &#039;website&#039;;   Should I have to put the url of the page which I want member to login before they can redirect to protected page, right? (in easy word, I mean the page that contain login form)

2. Do these code need to be in root folder? 

3. Is it possible if I would like these codes along with my other protected php pages located together in sub directory? Do I need to change any code inside?

Thank you for your kind reply.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Thank you very much for the code.</p>
<p>I have some few questions to ask as below :</p>
<p>1. $domain_code = &#039;website&#039;;   Should I have to put the url of the page which I want member to login before they can redirect to protected page, right? (in easy word, I mean the page that contain login form)</p>
<p>2. Do these code need to be in root folder? </p>
<p>3. Is it possible if I would like these codes along with my other protected php pages located together in sub directory? Do I need to change any code inside?</p>
<p>Thank you for your kind reply.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
