Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ob_start();
- session_start();
- include 'config2.php';
- ?>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <div align="center" style="font: 12px Verdana;"><br />
- <?php
- $_SESSION['username'] = $_POST['username'];
- $_SESSION['password'] = $_POST['password'];
- $username = $_SESSION['username'];
- $password = md5($_SESSION['password']);
- $leshdale = $_POST['username'];
- $justchecking = mysql_query("SELECT * FROM users WHERE nickname = '$username' and password = '$password'");
- $login = $_POST['login'];
- if(isset($login)) {
- if (mysql_fetch_row($justchecking) != 0) {
- header("Location: p.php?page=home");
- echo 'Редактирай профил <br /> ';
- }
- else {
- echo 'Wrong username or password.';
- }
- }
- else {?>
- <form action="" method="post">
- Потребител:<br />
- <input type="text" name="username" /><br />
- Парола:<br />
- <input type="password" name="password" />
- <br /><input type="submit" name="login" value="Влез" style="margin-top: 2px;" />
- </form>
- <?php
- }
- ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement