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


Where the fun begins!
 
Homedead forum =(FAQSearchMemberlistUsergroupsRegisterLog 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!!!!

Share | 
 

 HTML/PHP tutorial #4 - password protect a page

View previous topic View next topic Go down 
AuthorMessage
t0ph4x0r
Lieutenant
Lieutenant


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

PostSubject: HTML/PHP tutorial #4 - password protect a page   Sun 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
View user profile
 
HTML/PHP tutorial #4 - password protect a page
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Need a custom html page?
» Sharepoint forgets login and doesn't react on clicks on in-page-links
» [Solved] change text on poster every refresh/reload page
» Quote box to HTML page
» open every link in a new tab?

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