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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

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

    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 ?

    #2
    Start with something simple like this:
    PHP Code:
    $pwd $_GET["pwd"];
    if(
    $pwd!="Enter Your Pass Here"){
    print 
    '<form action="ownercp.php?action=$action&amp;sid=$sid" method="get">
    Password: <input type="password" name="pwd" maxlength="30"/><br/>
    <input type="submit" value="Sumit"/>
    </form>'
    ;
    exit();

    then add &amp;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

    Comment


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

      Comment


        #4
        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 ?>
        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.

        Comment


          #5
          Originally posted by berty14 View Post
          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 &amp;pwd=$pwd

          Comment


            #6
            TheNemesis what happens if i goto myfile.php ? and miss out your current page? :P

            Comment


              #7
              <?php include("nemesislogin.php"); ?> :D

              Comment

              Working...
              X