Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //login
- include "config.php";
- if(!empty($_POST['u_email']))
- {
- // echo "<pre>";
- // var_dump($_POST);
- // echo "</pre>";
- $email= mysql_real_escape_string($_POST['username']);
- $password= ($_POST['pwd']);
- $sql = "SELECT * FROM users where username = '$email' and `pwd`='$password'";
- $qid = mysql_query($sql);
- if($data = mysql_fetch_array($qid))
- {
- $_SESSION['login'] = true;
- $_SESSION['username'] = $data['username'];
- header ("location: profail.php");
- }
- else
- {
- echo "login gagal";
- }
- }
- include "template/header.html";
- include "template/login.html";
- include "template/footer.html";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement