View Full Version : Login Script Help ?
Xeros
30-01-2008, 05:46 PM
Well my site has a proxy built in and Im making it password protected. I am currently using the password protected script located in the Cpanel.
However Im wanting to make a login page for it instead of just the popup..
Does any1 have a tut or link?
Ive tried using the script in the Web Tutorial section called Mutli login however you can login etc and if u dnt login u can still access the page...
help please (:
+rep
Hitman
30-01-2008, 05:52 PM
Use this, it's simple. :)
<?php
$password = "PASSWORD"; // change PASSWORD to the password
$entered = $_POST['password'];
if ($_POST['login']) {
if ($entered != $password) {
echo "Sorry, wrong password"; // error message if the pass is wrong
} else {
echo "yay"; //redirect with html if you want
}
} else {
echo "<form action=\"secure.php\" method=\"POST\">Password<br /><input type=\"password\" name=\"password\"><br /><br /><input type=\"submit\" name=\"login\" value=\"Enter\"></form>";
}
?>
Try that. Save as secure.php BTW, make the page name something like bzicusgxhcu828UDJCxXIsskdk.php for the proxy so nobody can find it.
Xeros
30-01-2008, 06:01 PM
okay ty :)
Assassinator
30-01-2008, 06:03 PM
Also what Hitman said is right, your better using frames when your logged in, like use just 1 frame and have something like
<?php
$password = "PASSWORD"; // change PASSWORD to the password
$entered = $_POST['password'];
if ($_POST['login']) {
if ($entered != $password) {
echo "Sorry, wrong password"; // error message if the pass is wrong
} else {
echo "yay"; //redirect with html if you want
}
}elseif (isset($_entered['entered'])){
header("Location: logged_in.php");
?>
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.