PGF Gamers
Hi, and thanks for visiting =D

Login to post in forums and become more than a member!

Please wait a moment for the chatbox to load ;D
PGF Gamers
Hi, and thanks for visiting =D

Login to post in forums and become more than a member!

Please wait a moment for the chatbox to load ;D
PGF Gamers
Would you like to react to this message? Create an account in a few clicks or log in to continue.


Where the fun begins!
 
Homedead forum =(SearchLatest imagesRegisterLog in
!!!!I am considering a full site overhaul to re-do everything. I will discuss with the other staff. If it happens the forum may go down for a day or two-Trevor!!!!

 

 HTML/PHP tutorial #4 - password protect a page

Go down 
AuthorMessage
t0ph4x0r
Lieutenant
Lieutenant



Number of posts : 6
Age : 34
ranking : 5778
forum activity : 0
Registration date : 2009-02-01

HTML/PHP tutorial #4 - password protect a page Empty
PostSubject: HTML/PHP tutorial #4 - password protect a page   HTML/PHP tutorial #4 - password protect a page EmptySun Feb 01, 2009 7:58 am

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 Smile
Back to top Go down
 
HTML/PHP tutorial #4 - password protect a page
Back to top 
Page 1 of 1
 Similar topics
-
» HTML tutorial #1- base of a website
» HTML tutorial 3 - minor tweaks/ just for fun
» HTML tutorial #2- adding images/ fun with pictures
» HTML tutorial #5 - select boxes and radio buttons
» i dont get html

Permissions in this forum:You cannot reply to topics in this forum
PGF Gamers :: Computers and Internet :: Building websites :: HTML-
Jump to: