Guest User

Untitled

a guest
Oct 11th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <?php mysqli_select_db($conexion, $database_conexion);
  2. $query_DatosWeb = sprintf ("SELECT * FROM z_users WHERE user=%s AND password=%s",
  3. GetSQLValueString($_POST['user'], "text"),
  4. GetSQLValueString($_POST['pass'], "text"));
  5. $DatosWeb = mysqli_query($conexion, $query_DatosWeb) or die(mysqli_error());
  6. $row_DatosWeb = mysqli_fetch_assoc($DatosWeb);
  7. $totalRows_DatosWeb = mysqli_num_rows($DatosWeb);
  8.  
  9. if($totalRows_DatosWeb==1){
  10. $_SESSION['iduser']=$row_DatosWeb['id'];
  11. $_SESSION['nombreuser']=$row_DatosWeb['user'];
  12.  
  13. }
  14.  
  15. mysqli_free_result($DatosWeb);
  16. $dato= array($row_DatosWeb['url'], $row_DatosWeb['titulo'], $row_DatosWeb['admin']); ?>
Add Comment
Please, Sign In to add comment