Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global $wpdb;
- if($_SERVER["REQUEST_METHOD"] == "POST")
- {
- $username = $wpdb->escape($_REQUEST['username']);
- $password = $wpdb->escape($_REQUEST['password']);
- $_SESSION['username'] = $username;
- $wpdb->get_results("select * from wp_registration where Email='$username' AND Password='$password'");
- $count= $wpdb->num_rows;
- if($count == 1) {
- header('Location: index.php');
- }
- else {
- echo"<script>alert('Incorrect Username or Password!')</script>";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement