i want to code a php file that allow u to enter pwd to go in to owner tools

Started on the old forum in May 2010 · view the original in the archive · old links redirect here

6 replies · 801 views · started 16 years ago · 1 min read

3 participants
berty14 Developer · 52 posts #1

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 ?

something else Fellow · 2,296 posts #2

Start with something simple like this:

$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();
}

then add &pwd=$pwd to all your links in ownercp.php

but a better way is to use sessions or cookies saves a lot of coding lol

berty14 Developer · 52 posts #3

so when i create a php file with that code i have to put it in my ownercp.php?

TheNemesis Junior · 10 posts #4

You could do:

<?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 } ?>

Just created it real quick, you can change it to function better if you wish. Rename the myusername and mypass to what you want the pass to be.

something else Fellow · 2,296 posts #5

berty14 wrote: so when i create a php file with that code i have to put it in my ownercp.php?

yep and ownerproc.php and change all your links and forms so t contains &pwd=$pwd

something else Fellow · 2,296 posts #6

TheNemesis what happens if i goto myfile.php ? and miss out your current page? 😛

TheNemesis Junior · 10 posts #7
<?php include("nemesislogin.php"); ?> 😀

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close