i need help here i want to code a php file that allow u to enter pwd to go in to owner tools admin tool and mod tool but i do not know how to start can any one help me ?
i want to code a php file that allow u to enter pwd to go in to owner tools
Collapse
X
-
Start with something simple like this:
PHP Code:$pwd = $_GET["pwd"];
if($pwd!="Enter Your Pass Here"){
print '<form action="ownercp.php?action=$action&sid=$sid" method="get">
Password: <input type="password" name="pwd" maxlength="30"/><br/>
<input type="submit" value="Sumit"/>
</form>';
exit();
}
but a better way is to use sessions or cookies saves a lot of coding lol
-
You could do:
PHP Code:
<?php
/**
* @author
* @copyright 2010
*/
$username = $_GET['username'];
$password = $_GET['password'];
if(isset($username) && isset($password)){
if($username == 'myusername' && $password == 'mypass'){
header("LOCATION: myfile.php");
} else {
echo 'Your details were not correct.';
}
} else {
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="Nemesis" />
<title>Admincp</title>
</head>
<body>
<form action="" method="GET">
Username<input name="username" type="text" />
Password<input name="password" type="password" />
<input type="submit" name="submit" value="Login" />
</form>
</body>
</html>
<?php } ?>
Comment
Comment