Guest User

Untitled

a guest
Nov 24th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. <?php
  2. require_once('conexion.php');
  3. $username = mysql_real_escape_string($_POST['username']);
  4. $password = mysql_real_escape_string($_POST['password']);
  5.  
  6. $cmd="select id from usuarios where correo='$username' and password='$password' ";
  7.  
  8. $result = mysql_query($cmd);
  9.  
  10. if( mysql_num_rows($result) == 1){
  11. setcookie('autorized',1,0);
  12. header("Location: galeria.php");
  13. }else{
  14. header("Location: login.php");
  15. }
  16. ?>
Add Comment
Please, Sign In to add comment