Hello, my name is Cole Snydle. In my tutorials i will be using a mixture of PHP and HTML. One of my favorite hosts (a host is what you "host" your website on) is
http://www.freehostia.com/. The good thing about Freehostia is that you can code from the site and you can host PHP and MySql. now just open up "Notepad", always and we will begin the tutorial.
Hey everybody, in this tutorial i will show you how to make another page, and password protect it (in a way).
first off, if your doing this on freehostia, it will make this a lot easier. just givin that we're going to be coding a bit of php here, (if your really good at computer stuff- as i am -you can go download WAMP server, it comes with apache and everything. download it here -
http://www.wampserver.com/en/download.php). so the first thing we need to do is make the other page so open up notepad, or on freehostia just make a new text file called "*whateveruwant*.php" now in that file, type this code-
- Code:
-
<form name='password' method="GET">
password:<input type="text" name="pass">
<br /><input type="submit" value="go!"><br />
</form>
<?php
$pass=$_GET['pass'];
if($pass == "password"){
?>
<a href="wateveruput.html">correct</a>
<?php
}
?>
if you want an example, just go to my site,
http://bounty-wars.freehostia.com/admin.php/The Form isnt something you need to know right now or ever because all you have to do is go on google and typ "HTML form".
but the PHP, that you will learn in the PHP tutorial series.
hope you learned a lot