Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- session_start();
- include("includes/config.php");
- if($_SERVER["REQUEST_METHOD"] == "POST")
- {
- $myusername = addslashes($_POST['username']);
- $mypassword = addslashes($_POST['password']);
- $sql = "SELECT userid FROM tbl_users where username='$myusername' and password='$mypassword'";
- $result = mysql_query($sql);
- $count = mysql_num_rows($result);
- if($count == 1){
- $_SESSION['login_admin']=$myusername;
- header("location: http://localhost/clogin1/admin/");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement