<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Code The World — Simple singe page password protection]]></title>
		<link>https://codetheworld.com/viewtopic.php?id=4</link>
		<atom:link href="https://codetheworld.com/extern.php?action=feed&amp;tid=4&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Simple singe page password protection.]]></description>
		<lastBuildDate>Sun, 15 Jun 2008 01:01:27 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Simple singe page password protection]]></title>
			<link>https://codetheworld.com/viewtopic.php?pid=4#p4</link>
			<description><![CDATA[<p>Description<br />Password protection for a single page. Visitors are required to enter a password and username into a login form to view the page content.</p><p>The code<br /></p><div class="codebox"><pre><code>&lt;?php

// Define your username and password
$username = &quot;someuser&quot;;
$password = &quot;somepassword&quot;;

if ($_POST[&#039;txtUsername&#039;] != $username || $_POST[&#039;txtPassword&#039;] != $password) {

?&gt;

&lt;h1&gt;Login&lt;/h1&gt;

&lt;form name=&quot;form&quot; method=&quot;post&quot; action=&quot;&lt;?php echo $_SERVER[&#039;PHP_SELF&#039;]; ?&gt;&quot;&gt;
    &lt;p&gt;&lt;label for=&quot;txtUsername&quot;&gt;Username:&lt;/label&gt;
    &lt;br /&gt;&lt;input type=&quot;text&quot; title=&quot;Enter your Username&quot; name=&quot;txtUsername&quot; /&gt;&lt;/p&gt;

    &lt;p&gt;&lt;label for=&quot;txtpassword&quot;&gt;Password:&lt;/label&gt;
    &lt;br /&gt;&lt;input type=&quot;password&quot; title=&quot;Enter your password&quot; name=&quot;txtPassword&quot; /&gt;&lt;/p&gt;

    &lt;p&gt;&lt;input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Login&quot; /&gt;&lt;/p&gt;

&lt;/form&gt;

&lt;?php

}
else {

?&gt;

&lt;p&gt;This is the protected page. Your private content goes here.&lt;/p&gt;

&lt;?php

}

?&gt;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Casper)]]></author>
			<pubDate>Sun, 15 Jun 2008 01:01:27 +0000</pubDate>
			<guid>https://codetheworld.com/viewtopic.php?pid=4#p4</guid>
		</item>
	</channel>
</rss>
