As the title says this is extremely simple, not secure and is just 5 minutes worth of code. Didn't take long at all, just thought I'd share it.
- Can't leave it blank
- Must enter right username and password
- Tweak it all you like.
PHP Code:
<html>
<head>
<title>Form</title>
</head>
<center>
<body>
<?php
/*
Snippit Made By BreShiE
SF Coders
*/
// Tells If The Button Is Pressed
If (isset($_POST["button"])){
//Username and Password variables
$user = "breshie";
$pass = "yourpass";
// Checks To See If The Text Boxes Are Empty
If ($_POST["text"] == "" || $_POST["pass"] == ""){
echo '<script>alert("Please enter something into the text boxes!")</script>';
}else{
// Checks to see if it's the right details or not
If ($_POST["text"] == $user && $_POST["pass"] == $pass){
echo 'Correct User!!';
}else{
echo 'Incorrect!';
}
}
}
?>
<form action="first.php" method="POST">
Username:
<br /><input type="text" name="text">
<br />
<br />
Password:
<br />
<input type="password" name="pass">
<br />
<input type="submit" name="button" value"Click Me">
</form>
</body>
</html>
http://xblforums.net/work