Jump to content
php.lv forumi

Pentiums

Reģistrētie lietotāji
  • Posts

    617
  • Joined

  • Last visited

Posts posted by Pentiums

  1. tagad ir kā vēlējies?

     

    <?
    session_start();
    ?>
    <?php
    if (isset($_POST['submit'])) {
    $user = $_POST['user'];
    $pass = $_POST['pass'];
    if($user=="zoss" && $pass=="zoss123") {
    header('Location: members.php');
    }
    else {
    $bummmmmm = "Lietotājvārds vai parole nav pareiza!";
    }
    }
    ?>
    <html>
    <title>Loginu sistema</title>
    <body>
    <form action="login.php" method="POST">
    Niks: <input type="text" name="user" />
    <br/>Parole: <input type="password" name="pass" />
    <br/><input type="submit" value="OK" name="submit" />
    <input type="reset" value="No jauna!" />
    </form>
    <?php echo $bummmmmm; ?>
    </body>
    </html>

  2. kapēc "method="GET""??? un vispār:

     

    <?
    session_start();
    ?>
    <?php
    $user = $_POST['user'];
    $pass = $_POST['pass'];
    if($user=="zoss" && $pass=="zoss123") {
    header('Location: members.php');
    }
    else {
    echo "Lietotājvārds vai parole nav pareiza!";
    }
    ?>
    <html>
    <title>Loginu sistema</title>
    <body>
    <form action="login.php" method="POST">
    Niks: <input type="text" name="user" />
    <br/>Parole: <input type="password" name="pass" />
    <br/><input type="submit" value="OK" />
    <input type="reset" value="No jauna!" />
    </form>
    
    </body>
    </html>

×
×
  • Create New...