Hey,
I am a noob as well, but I have found a relitivley easy script to use, and it requires no knowledge of mysql whatsoever. All you have to do is know how to link with it.
here it is:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Login</TITLE>
<!--
Written By: Nicholas Tseles
1/25/2005
-->
</HEAD>
<BODY bgcolor="#000000" text="red">
<!--
The following javascript function will act as our error page
-->
<script language="javascript">
function error()
{
document.write("<br><br><br><body bgcolor='black' text='red' link='purple' alink='purple' vlink='purple'><center>Unable to confirm password!<br><br><a href='index.php'><h4>Back</h4></a></center></body>");
}
//This function will make sure the text box is not empty
function check()
{
if(form1.pass.value == ""){error();}
}
</script>
<center>
<br><br><br>
<center><form name="form1" method="post" action="check1.php">
Username<input type="username" name="user" size="15"><br><br>
Password<input type="password" name="pass" size="15"><br><br>
<form name="form1" method="post" action="check.php"><br />
<input type="submit" name="submit" value="Enter" onclick="check()">
</center
</form>
<br><br><br>
If your password fails<br>
your IP will be logged as<br>
<!-- The following php code just scares people by showing them their
ip, you dont really have to log it.
-->
<?php
$ip = $_SERVER['REMOTE_ADDR'];
echo $ip;
?>
</center>
</BODY>
</HTML>
after yu implement this script, all you have to do is have 2 docs named check and check 1 both .php
here is the code for them:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Login</TITLE>
</HEAD>
<!--
Written By:Nicholas Tseles
1/25/05
-->
<BODY>
<?php
$password=$POST['pass']; //Gets the password from previous page entry
$fp=fopen("pass.txt","r"); //Opens the Pass.txt file
$data=fgets($fp); //Reads the File entirely
fclose($fp); //Closes the file since we already got our info
if($password == $data) //compare passwords
{
echo "Password Accepted"; //Here is where you will set your path for entry
}
else
{
echo "<br><br><br><body bgcolor='black' text='red' link='purple' alink='purple' vlink='purple'><center>Unable to confirm password!<br><br><a href='index.php'><h4>Back</h4></a></center></body>";
}
$username=$POST['user']; //Gets the password from previous page entry
$fp=fopen("username.txt","r"); //Opens the Pass.txt file
$data=fgets($fp); //Reads the File entirely
fclose($fp); //Closes the file since we already got our info
if($username == $data) //compare passwords
{
echo "<br>Username Accepted"; //Here is where you will set your path for entry
}
else
{
echo "<br><br><br><body bgcolor='black' text='red' link='purple' alink='purple' vlink='purple'><center>Unable to confirm username!<br><br><a href='index.php'><h4>Back</h4></a></center></body>";
}
?>
</BODY>
</HTML>
then as a data base, all you have to do is make 2 text files and save them as
pass.txt-which will have all your passwords
username.txt-which will have all your usernames
this way they are stored offsite
all you do is stick them in the same web folder as your site
Do not forget to set your path of entry on the check pages to redirect you to the html page
good luck!
p.s.
remember that i am a noob too so take my ideas with extreme caution
wOOt