<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1033195" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1033195</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-do-you-password-protect-page-frontpage#comment-1194183</link>
    <description> &lt;p&gt;Hiya,&lt;/p&gt;
&lt;p&gt;I really appreciate that. Thanks for taking the time to do it.&lt;/p&gt;
&lt;p&gt;I&#039;m going to be a bit busy myself over the next couple of days with work, so I&#039;ll sort it out as soon as I get chance to and I&#039;ll let you know what happens.&lt;/p&gt;
&lt;p&gt;Thanks again,&lt;/p&gt;
&lt;p&gt;Budgie.&lt;/p&gt;
 </description>
     <pubDate>Mon, 27 Feb 2006 23:07:31 +0000</pubDate>
 <dc:creator>budgie</dc:creator>
 <guid isPermaLink="false">comment 1194183 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-do-you-password-protect-page-frontpage#comment-1194143</link>
    <description> &lt;p&gt;in the code there are a couple of comments (comments look like /* and */  there are in orange above)&lt;br /&gt;
they tell you which parts to change, they are your username, password and database names you used to set your database up with.&lt;br /&gt;
Also at end of login page you need to define another page or put the page you want them to see there.&lt;/p&gt;
&lt;p&gt;Now this code is only basic, and there is a lot more you can do (like encrypt the password, count how many login attempts ....) but sadly time hasn&#039;t been on my side of late.&lt;br /&gt;
If you have a whole section where you will allow people to view after logging in you will need a cookie to keep track of the login so are not asked each time they login.&lt;/p&gt;
 </description>
     <pubDate>Mon, 27 Feb 2006 09:39:37 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1194143 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-do-you-password-protect-page-frontpage#comment-1194142</link>
    <description> &lt;p&gt;Ok I have run out of time again but have thrown together some code for you, I haven&#039;t tested it so it will either work or will give an error, try it and see.&lt;br /&gt;
The validation is basic but should be enough for your friends, you may want to adjust the length (number besides the less than signs) to suit your needs.&lt;br /&gt;
You need two pages, register.php and login.php&lt;br /&gt;
&lt;strong&gt;register.php&lt;/strong&gt;&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;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;action&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;] = isSet(&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;action&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]) ? &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;action&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;] : &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&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;action&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;] == &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;first&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;fname&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;] = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;trim&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;htmlspecialchars&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&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;fname&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if((empty(&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;fname&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;])) || (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;strlen&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&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;fname&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;])&amp;lt; &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;2&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$err&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$the_errors &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;.= \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;lt;b&amp;gt;First name:&amp;lt;/b&amp;gt; Must be more than 2 characters/digits long&amp;lt;br /&amp;gt;\&quot;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;lname&#039;] = trim(htmlspecialchars(&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;lname&#039;]));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if((empty(&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;lname&#039;])) || (strlen(&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;lname&#039;])&amp;lt; &#039;2&#039;))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$err&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$the_errors&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; .= \&quot;&amp;lt;b&amp;gt;Last name:&amp;lt;/b&amp;gt; Must be more than 2 characters/digits long&amp;lt;br /&amp;gt;\&quot;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;email&#039;] = trim(&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;email&#039;]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if((strlen(&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;email&#039;])&amp;lt;5) || (empty(&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;email&#039;]))) &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$err&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$the_errors&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; .= \&quot;&amp;lt;b&amp;gt;Email:&amp;lt;/b&amp;gt; Please enter a valid email address.&amp;lt;br /&amp;gt;\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; elseif(!eregi(\&quot;^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$\&quot;,&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;email&#039;]))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$err&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = 1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$the_errors&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; .= \&quot;&amp;lt;b&amp;gt;Email:&amp;lt;/b&amp;gt; Please enter a valid email address.&amp;lt;br /&amp;gt;\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;orga&#039;] = trim(htmlspecialchars(&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;orga&#039;]));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if((empty(&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;orga&#039;])) || (strlen(&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;orga&#039;])&amp;lt; &#039;2&#039;))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$err&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$the_errors&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; .= \&quot;&amp;lt;b&amp;gt;Organisation:&amp;lt;/b&amp;gt; Must be more than 2 characters/digits long&amp;lt;br /&amp;gt;\&quot;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;addy&#039;] = trim(htmlspecialchars(&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;addy&#039;]));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if((empty(&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;addy&#039;])) || (strlen(&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;addy&#039;])&amp;lt; &#039;10&#039;))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$err&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$the_errors&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; .= \&quot;&amp;lt;b&amp;gt;Postal address:&amp;lt;/b&amp;gt; Must be more than 10 characters/digits long&amp;lt;br /&amp;gt;\&quot;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;phnum&#039;] = trim(htmlspecialchars(&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;phnum&#039;]));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if((empty(&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;phnum&#039;])) || (strlen(&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;phnum&#039;])&amp;lt; &#039;8&#039;))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$err&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$the_errors&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; .= \&quot;&amp;lt;b&amp;gt;Phone Number:&amp;lt;/b&amp;gt; Must be more than 8 digits long&amp;lt;br /&amp;gt;\&quot;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;mobnum&#039;] = trim(htmlspecialchars(&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;mobnum&#039;]));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if((empty(&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;mobnum&#039;])) || (strlen(&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;mobnum&#039;])&amp;lt; &#039;8&#039;))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$err&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$the_errors&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; .= \&quot;&amp;lt;b&amp;gt;Postal address:&amp;lt;/b&amp;gt; Must be more than 8 characters/digits long&amp;lt;br /&amp;gt;\&quot;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$err&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; == 0)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*change User, Password and Database to what you set your database up with */ &lt;br /&gt;mysql_connect(\&quot;localhost\&quot;,\&quot;User\&quot;,\&quot;Password\&quot;) or die (\&quot; ERROR \&quot;);&lt;br /&gt;mysql_select_db(\&quot;Database\&quot;) or die (\&quot; ERROR \&quot;); &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* change database name to yoru database name */&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$sql&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=\&quot;INSERT INTO databasename (firstname, lastname, email, organisation, address, ph_number, mob_number)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUES (&#039;\&quot;. Addslashes(&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: #0000BB&quot;&gt;fname&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;).\&quot;&#039;, &#039;\&quot;. Addslashes(&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: #0000BB&quot;&gt;lname&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;).\&quot;&#039;, &#039;\&quot;. Addslashes(&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: #0000BB&quot;&gt;fname&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;).\&quot;&#039;, &#039;\&quot;. &lt;br /&gt;Addslashes(&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: #0000BB&quot;&gt;email&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;).\&quot;&#039;, &#039;\&quot;. Addslashes(&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: #0000BB&quot;&gt;orga&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;).\&quot;&#039;, &#039;\&quot;. Addslashes(&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: #0000BB&quot;&gt;addy&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;).\&quot;&#039;, &#039;\&quot;. Addslashes(&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: #0000BB&quot;&gt;phnum&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;).\&quot;&#039;, &#039;\&quot;. &lt;br /&gt;Addslashes(&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: #0000BB&quot;&gt;mobnum&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;).\&quot;&#039;)\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$res&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=mysql_query (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$sql&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$res&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;==0)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$err&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$sql&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; .\&quot;&amp;lt;br /&amp;gt;\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&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;action&#039;] == &#039;&#039;) || (&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;action&#039;] == &#039;first&#039; &amp;amp;&amp;amp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$err&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;))&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&amp;lt;form name=\&quot;registration\&quot; action=\&quot;register.php\&quot; method=\&quot;post\&quot;&amp;gt;&lt;br /&gt;&amp;lt;input type=\&quot;hidden\&quot; name=\&quot;action\&quot; value=\&quot;first\&quot; /&amp;gt;&lt;br /&gt;First name &amp;lt;input tyep=\&quot;text\&quot; name=\&quot;fname\&quot; /&amp;gt;&lt;br /&gt;Last name &amp;lt;input type=\&quot;text\&quot; name=\&quot;lname\&quot; /&amp;gt;&lt;br /&gt;Email &amp;lt;input tyep=\&quot;text\&quot; name=\&quot;email\&quot; /&amp;gt;&lt;br /&gt;Organisation &amp;lt;input tyep=\&quot;text\&quot; name=\&quot;orga\&quot; /&amp;gt;&lt;br /&gt;Postal address &amp;lt;input tyep=\&quot;text\&quot; name=\&quot;addy\&quot; /&amp;gt;&lt;br /&gt;Phone number &amp;lt;input tyep=\&quot;text\&quot; name=\&quot;phnum\&quot; /&amp;gt;&lt;br /&gt;Mobile phone &amp;lt;input tyep=\&quot;text\&quot; name=\&quot;mobnum\&quot; /&amp;gt;&lt;br /&gt;&amp;lt;input type=\&quot;submit\&quot; value=\&quot; Register Me \&quot; /&amp;gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&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;action&#039;] == &#039;first&#039; &amp;amp;&amp;amp; !&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$err&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;)&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&amp;lt;div class=\&quot;title\&quot;&amp;gt;Your registration has been successful.&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;div align=\&quot;center\&quot;&amp;gt;&lt;br /&gt;&amp;lt;br /&amp;gt;&lt;br /&gt;Thank you for joining my site and becoming our newest member.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;A confirmation email has been sent to: &amp;lt;em&amp;gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$email&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&amp;lt;/em&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;&lt;br /&gt;You can login &amp;lt;a href=\&quot;login.php\&quot;&amp;gt;here at any time&amp;lt;/a&amp;gt;.&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;/div&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;
&lt;p&gt;&lt;strong&gt;login.php&lt;/strong&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;dowhat&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;] == &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;login&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;/*change User, Password and Database to what you set your database up with */ &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_connect&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;localhost\&quot;,\&quot;User\&quot;,\&quot;Password\&quot;) or die (\&quot; ERROR \&quot;);&lt;br /&gt;mysql_select_db(\&quot;Database\&quot;) or die (\&quot; ERROR \&quot;); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$username&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = addslashes(&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;username&#039;]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$password&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = addslashes(&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;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* change database name to yoru database name */&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$query&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;select username,password from databasename where nick=&#039;\&quot;.&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$username&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;.\&quot;&#039; AND password=&#039;\&quot;.&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$password&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;.\&quot;&#039;\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$res&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = mysql_query(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$query&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(mysql_num_rows(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$res&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;) == 0)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$err&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo \&quot;Login incorrect\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp; exit;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* change the index.php to the page you want them to see or attach the page here and remove the following line but leave the exit; */&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Header(\&quot;Location: index.php\&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&amp;lt;form name=\&quot;user_login\&quot; action=\&quot;login.php\&quot; method=\&quot;post\&quot;&amp;gt;&lt;br /&gt;&amp;lt;input type=\&quot;text\&quot; name=\&quot;username\&quot; size=\&quot;20\&quot; maxlength=\&quot;20\&quot; /&amp;gt;&lt;br /&gt;&amp;lt;input type=\&quot;password\&quot; name=\&quot;password\&quot; size=\&quot;20\&quot; maxlength=\&quot;20\&quot; /&amp;gt;&lt;br /&gt;&amp;lt;input type=\&quot;hidden\&quot; name=\&quot;dowhat\&quot; value=\&quot;login\&quot; /&amp;gt;&lt;br /&gt;&amp;lt;input type=\&quot;submit\&quot; name=\&quot;\&quot; value=\&quot;Login\&quot; /&amp;gt;&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 27 Feb 2006 09:33:31 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1194142 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-do-you-password-protect-page-frontpage#comment-1194075</link>
    <description> &lt;p&gt;Sorry that is my fault, the &lt;strong&gt;User&lt;/strong&gt; should of been bold, I didn&#039;t check it (bad habit of that).&lt;br /&gt;
replace the &lt;strong&gt;User&lt;/strong&gt; with your username you set the database up with, same for &lt;strong&gt;password&lt;/strong&gt; and the others.&lt;/p&gt;
&lt;p&gt;You need to set up the database first before you can use the login form (it need somewhere to check from).&lt;/p&gt;
&lt;p&gt;I&#039;m sorry I&#039;m going to have to put you off again, has been really long day and is past my bedtime already, I am stuffed and have another long day tomorrow.&lt;br /&gt;
I promise I&#039;ll give you some code tomorrow, if I don&#039;t have time to write it out (and explain it) I&#039;ll grab one from hotscripts and take the form etc out of it and post the code to use with instructions.&lt;/p&gt;
&lt;p&gt;I often live up to my nickname&lt;/p&gt;
 </description>
     <pubDate>Sun, 26 Feb 2006 09:50:20 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1194075 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-do-you-password-protect-page-frontpage#comment-1194069</link>
    <description> &lt;p&gt;Hiya,&lt;/p&gt;
&lt;p&gt;I keep getting errors when I point the browser to the php file.&lt;br /&gt;
Firstly the errors comprised of unexpected &#039;[&#039; (or something like that) on line 19 (I think) and then unexpected &#039;/b&#039; on line 3 ...etc.&lt;/p&gt;
&lt;p&gt;I&#039;ve corrected these, but now the form just returns the Error message and nothing else.&lt;/p&gt;
&lt;p&gt;Is there a really simple code that I could use with just a username and a predetermined password, just so I could try it out?&lt;/p&gt;
&lt;p&gt;I&#039;ve had a look on Hotscripts as you suggested, but I don&#039;t really want the forms ..etc that display the adverts.&lt;/p&gt;
&lt;p&gt;Sorry about all this. I realise you&#039;re &quot;Busy&quot;.&lt;/p&gt;
 </description>
     <pubDate>Sun, 26 Feb 2006 03:53:14 +0000</pubDate>
 <dc:creator>budgie</dc:creator>
 <guid isPermaLink="false">comment 1194069 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-do-you-password-protect-page-frontpage#comment-1194059</link>
    <description> &lt;p&gt;I made a slight boo boo in that code, it needs &lt;strong&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;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;strong&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;at the very top &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;and &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;strong&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/strong&gt; at the very bottom of the page you created (or will just display as text).&lt;br /&gt;
Upload that file and point your browser to it ie: &lt;a href=&quot;http://www.yourwebsite.not/createdb.php&quot; class=&quot;bb-url&quot;&gt;yourwebsite.not/createdb.php&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The login form will only use the name and password, or email and password, which ever you prefer. make the form fields to similar or same names as databse, ie name=&quot;fname&quot; or name=&quot;firstname&quot;.&lt;/p&gt;
&lt;p&gt;the register form can be register.php and login form can be anything but will work with login.php&lt;br /&gt;
Note, you will not be able to view these (.php) pages on your computer unless you download and install a php/mysql/apache bundle.&lt;/p&gt;
&lt;p&gt;make the action of the form the same page as it&#039;s on (register.php and login.php) and method will be post on both as well.&lt;/p&gt;
&lt;p&gt;You can be secure or as loose as you want for the registration.&lt;/p&gt;
&lt;p&gt;the register.php page will eventually be set out like:&lt;/p&gt;
&lt;p&gt;submitted form validation&lt;br /&gt;
insert into database if all ok, send email and thank then or send to login page&lt;br /&gt;
display form if not been sent or error&lt;/p&gt;
&lt;p&gt;The login page will be:&lt;/p&gt;
&lt;p&gt;validation of submitted info (from database)&lt;br /&gt;
entry into a sub menu or whatever&lt;br /&gt;
if validation failed give error message&lt;br /&gt;
display form if not submitted&lt;/p&gt;
&lt;p&gt;Sorry am a bit rushed this morning, will have to finish it tonight, or if someone else just wants to do the php part from form ie: if (trim(htmlspecialchars($_POST[&#039;fname&#039;])) &amp;gt; 2)&lt;/p&gt;
 </description>
     <pubDate>Sat, 25 Feb 2006 20:39:46 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1194059 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-do-you-password-protect-page-frontpage#comment-1194058</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote: the database_name is now the name of my host, the same as my username&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Sorry, to correct that - it&#039;s now the name of my host followed by my username. I&#039;m not sure if this is right.&lt;/p&gt;
 </description>
     <pubDate>Sat, 25 Feb 2006 20:20:38 +0000</pubDate>
 <dc:creator>budgie</dc:creator>
 <guid isPermaLink="false">comment 1194058 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-do-you-password-protect-page-frontpage#comment-1194057</link>
    <description> &lt;p&gt;Ok - I&#039;ve done that. Some of it made a bit of sense, but I wasn&#039;t entirely sure what I was supposed to call the database table and the database name. The database table is now called &#039;database1&#039; which I found in the &#039;fpdb&#039; folder on my computer and the database_name is now the name of my host, the same as my username which I found in account on my host&#039;s page.&lt;/p&gt;
&lt;p&gt;I now have a file saved on my computer (amongst the other webpages) called createdb.php&lt;/p&gt;
&lt;p&gt;I&#039;ve also made a registration form and a login form in html. In the text boxes, should I be setting the &#039;form field properties&#039; to match the php file? i.e. same names on the text boxes &amp;amp; same number of characters?&lt;/p&gt;
 </description>
     <pubDate>Sat, 25 Feb 2006 20:16:56 +0000</pubDate>
 <dc:creator>budgie</dc:creator>
 <guid isPermaLink="false">comment 1194057 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-do-you-password-protect-page-frontpage#comment-1194045</link>
    <description> &lt;p&gt;if you dont want to go thru phpmyadmin, create a page in notepad and save it as createdb.php and inside copy and paste the following:&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: #FF8000&quot;&gt;/* start copying from here */&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_connect&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;localhost\&quot;,\&quot;&amp;lt;strong&amp;gt;User&amp;lt;/strong&amp;gt;\&quot;,\&quot;&amp;lt;strong&amp;gt;Password&amp;lt;/strong&amp;gt;\&quot;) or die (\&quot; ERROR \&quot;);&lt;br /&gt;mysql_select_db(\&quot;&amp;lt;strong&amp;gt;Database&amp;lt;/strong&amp;gt;\&quot;) or die (\&quot; ERROR \&quot;);&lt;br /&gt;&lt;br /&gt;if (mysql_query(\&quot;CREATE TABLE &amp;lt;strong&amp;gt;database_name&amp;lt;/strong&amp;gt; (&lt;br /&gt;&amp;nbsp; id int(4) NOT NULL auto_increment,&lt;br /&gt;&amp;nbsp; firstname varchar(20) NOT NULL,&lt;br /&gt;&amp;nbsp; lastname varchar(30) NOT NULL,&lt;br /&gt;&amp;nbsp; email varchar(50) NOT NULL,&lt;br /&gt;&amp;nbsp; organisation varchar(30) NOT NULL,&lt;br /&gt;&amp;nbsp; address varchar(65) NOT NULL,&lt;br /&gt;&amp;nbsp; ph_numer varchar(20) NOT NULL,&lt;br /&gt;&amp;nbsp; mob_number varchar(20) NOT NULL&lt;br /&gt;) TYPE=MyISAM;\&quot;)) &lt;br /&gt;{ echo \&quot;Creating table &amp;lt;strong&amp;gt;database_name&amp;lt;/strong&amp;gt; : Done\&quot;; } &lt;br /&gt;else { echo \&quot;ERROR creating table &amp;lt;strong&amp;gt;database_name&amp;lt;/strong&amp;gt; : Failed\&quot;; }&lt;br /&gt;&lt;br /&gt;/* stop copying here */&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;
User should be changed to your database username&lt;br /&gt;
password to your database password you set&lt;br /&gt;
database is the name of the database table you created&lt;br /&gt;
the database_name is the name of your database you choose&lt;br /&gt;
The id is an automatic number assigned to each member as they join, the number (4) will allow 9999 members, if you plan on having more than this change it to 5 or 6&lt;br /&gt;
The numbers in brackets are the maxlength of the items, I&#039;m not sure what part of the world your in so things like address and ph number may be to short (here ph number are 7 digits and mob 9-12&lt;/p&gt;
&lt;p&gt;That should take care of the database. now we need to make a html form to register, and another to login. If you know how to make a form, make one with all the options you wanted in the database (except the id one) and will show you next how to put it in the database (after some validation)&lt;/p&gt;
&lt;p&gt;Just incase you don&#039;t understand the above (or if I made a boo boo) you could just download a ready made script from &lt;a href=&quot;http://hotscripts.com/search/8826362.html&quot; class=&quot;bb-url&quot;&gt;http://hotscripts.com/search/8826362.html&lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Sat, 25 Feb 2006 09:53:21 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1194045 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/how-do-you-password-protect-page-frontpage#comment-1194012</link>
    <description> &lt;p&gt;Hiya,&lt;/p&gt;
&lt;p&gt;Ok - I&#039;ve just upgraded to CGI/PHP and MySQL. I think you&#039;re right about my host. It cost me an additional £55.73 plus VAT.&lt;/p&gt;
&lt;p&gt;RE: the database, I need the following information from clients:&lt;/p&gt;
&lt;p&gt;FULL NAME&lt;br /&gt;
EMAIL ADDRESS&lt;br /&gt;
NAME OF ORGANISATION&lt;br /&gt;
HOME ADDRESS&lt;br /&gt;
HOME/LANDLINE CONTACT NUMBER&lt;br /&gt;
MOBILE NUMBER&lt;/p&gt;
&lt;p&gt;I&#039;ve read the tutorials on my host&#039;s support pages but they seemed rather vague, so I&#039;ll continue to read up on the Internet.&lt;/p&gt;
&lt;p&gt;I really only want something as simple as the same password for all clients. It would be more or less the same clients over and over again, with maybe around 5 new clients per month, so I guess that the existing clients wouldn&#039;t have to enter all the above info everytime they log in - just their name &amp;amp; password.&lt;/p&gt;
 </description>
     <pubDate>Fri, 24 Feb 2006 15:15:24 +0000</pubDate>
 <dc:creator>budgie</dc:creator>
 <guid isPermaLink="false">comment 1194012 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
