<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1039529" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1039529</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/multiple-passwords-redirects#comment-1224209</link>
    <description> &lt;p&gt;teammatt3&#039;s example is spot on&lt;br /&gt;
an alternative is to name the page the same as the password&lt;/p&gt;
&lt;p&gt;say the page your form is on is called &quot;password_pages.php&quot;&lt;br /&gt;
on password_pages.php you will have the following form:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;form method=&amp;quot;get&amp;quot; action=&amp;quot;getname.php&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;password&amp;quot; value=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;input type=&amp;quot;submit&amp;quot; value=&amp;quot;Go&amp;quot; name=&amp;quot;submit&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;user enters a password and submits, the form goes to &quot;getname.php&quot;&lt;br /&gt;
this is what &quot;getname.php&quot; would look like:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;$page = $_GET[&amp;#039;password&amp;#039;]&amp;quot;.php&amp;quot;;&lt;br /&gt;&lt;br /&gt;header(&amp;quot;Location: &amp;#039;$page&amp;quot;);&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;so if user types in your form &quot;pagename1&quot; the above code will make the variable &quot;$page&quot; equal &quot;pagename1.php&quot; and will send them to pagename1.php&lt;br /&gt;
to cover for the possibility of the page the user requested not existing, have a 404.html such as&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;$pagefrom = $_SERVER[&amp;#039;HTTP_REFERER&amp;#039;];&lt;br /&gt;if ($pagefrom == &amp;quot;getname.php&amp;quot;) {echo &amp;quot;Sorry, incorrect password&amp;quot;;}&lt;br /&gt;else {echo &amp;quot;sorry page you are looking for is not on this site&amp;quot;;}&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;the code isn&#039;t 100% accurate but you get the idea&lt;br /&gt;
I don&#039;t know what you are using it for or how secure you need it, teammatt3&#039;s example is more secure as people cant guess the password and the passwords can be changed, in my example if they know the page names of your site they know the passwords&lt;br /&gt;
but of course it isnt 100% secure anyway as your passwords aren&#039;t unique to each members, so they can readily be shared with friends of people who you give the password to or the rest of the internet&lt;/p&gt;
&lt;p&gt;my example is easier for your users to remember passwords to the pages they wish to enter, again, I dont know what you are using it for so use whichever is best for your circumstance&lt;/p&gt;
 </description>
     <pubDate>Sun, 16 Sep 2007 16:28:05 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1224209 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/multiple-passwords-redirects#comment-1223971</link>
    <description> &lt;p&gt;If you have php you could do something like this (name the file tmp.php)&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;if(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;submit&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;] == &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;Go&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; if(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;password&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;] == &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;asjkld&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$location &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;http://example.com\&quot;;&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; elseif(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;password&#039;] == &#039;adasd&#039;)&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$location&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;http://webmaster-forums.net\&quot;;&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; elseif(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;password&#039;] == &#039;asdkjw&#039;)&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$location&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;http://google.com\&quot;;&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; else&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$location&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;tmp.php\&quot;;&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; header(\&quot;Location: &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$location&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot;);&lt;br /&gt;}&lt;br /&gt;else {&lt;br /&gt;&amp;lt;form action=\&quot;tmp.php\&quot; method=\&quot;post\&quot;&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;input type=\&quot;text\&quot; name=\&quot;password\&quot; value=\&quot;\&quot;/&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;input type=\&quot;submit\&quot; value=\&quot;Go\&quot; name=\&quot;submit\&quot; /&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Fri, 07 Sep 2007 00:03:47 +0000</pubDate>
 <dc:creator>teammatt3</dc:creator>
 <guid isPermaLink="false">comment 1223971 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
