Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- session_start();
- include('connect.php');
- if (isset($_POST['click'])) {
- $login=@$_POST['username'];
- $pas=@$_POST['password'];
- $sel = "SELECT * FROM user WHERE username = '$login' and password='$pas'";
- $res = mysql_query($sel);
- $num = mysql_num_rows($res);
- if($num==0)
- {
- }
- else {
- $_SESSION['username']="makson";
- echo $_SESSION['username'];
- }}
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <lang="uk">
- <meta charset="windows-1251">
- <link rel="icon" type="image/png" href="/Pic/play.ico" />
- <link rel="stylesheet" href="CSS/auth.css" type="text/css">
- <title>Max Login</title>
- </head>
- <body>
- <div id="control_bar">
- <a href="start.php" id="linkhref">Home</a>
- <a href="Cataloge.php" id="linkhref">Cataloge</a>
- <a href="about.php" id="linkhref">About Us</a>
- <a href="Index.php" id="linkhref">Authorization</a>
- </div>
- <div class="loginbox">
- <img src="/Pic/logo_man.png" class="avatar" >
- <h1>Authorization</h1>
- <form method="POST">
- <p>Username</p>
- <input type="text" required name="username" placeholder="Enter Username">
- <p>Password</p>
- <input type="password" required name="password" placeholder="Enter Password">
- <input type="submit" name="click" value="Login">
- <a href="index2.php">Registration</a>
- </form>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement