Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- include "conn.inc.php";
- if (isset($_POST['submit'])) {
- $query = "SELECT username, password FROM user" . "WHERE username = '" .$_POST['username'] . "' " . "AND password = (PASSWORD('" .$_POST['password'] . "')) ";
- $result = mysql_query($query) or die(mysql_error());
- if (mysql_num_rows($result) == 1) {
- $_SESSION['user_logged'] = $_POST['username'];
- $_SESSION['password'] = $_POST['password'];
- header ("Refresh: 5, URL=" . $_POST['redirect'] . "");
- echo "you are being redirected to your original page request"; }
- else {
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement