Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. function loginDocente($user, $pass)
  2.  
  3. if ( $pass == $fila["Passwd"] ) {
  4. //if ( $pass == $fila ["Passwd"] )
  5. $sql2 = "SELECT User FROM users_profesores WHERE (User='".$user."' OR EMail='".$user."') AND Passwd='$pass'";
  6. $result = mysqli_query($connect, $sql2);
  7. $num_row = mysqli_num_rows($result);
  8.  
  9. if ($num_row == "1") {
  10. $data = mysqli_fetch_array($result); // Obtiene una fila de resultados como un array asociativo, numérico, o ambos
  11. $_SESSION["user"] = $data["User"];
  12. echo "1";
  13. } else { //fin if num_row
  14. echo "no se encuentra registro";
  15. }
  16. } else { //fin if pass = passDB
  17. echo "passwds no coinciden";
  18. }
  19.  
  20. <?php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement