Guest User

Untitled

a guest
Apr 18th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. `<?php
  2. require ("../clases/Conexion.php");
  3.  
  4. session_start();
  5. $host = "localhost:3307";
  6. $user = "root";
  7. $pass = "";
  8. $bd = "nutricion";
  9. $con = mysqli_connect($host,$user,$pass,$bd) or die("Error al conectar al Servidor");
  10. $con = new conexion();
  11. $con->conectar();
  12.  
  13. if ($_SESSION["correo"]=='') {
  14. //header("Location:../index.php"); exit;
  15. echo "1";
  16. }
  17. $msql_db_query= mysqli_query($bd,"SELECT * FROM tbl_usuario WHERE correo='" . $_SESSION['correo'] . "';") or die ("Error al buscar usuario");
  18. if ($result) {
  19. $id_usuario = mysqli_result($msql_db_query(),0,'id');
  20. $nombre_usuario = mysqli_result($msql_db_query(),0,'nombre') . " " . mysqli_result($msql_db_query(),0,'apellido');
  21. }else {
  22. //header("Location:../index.php"); exit;
  23. echo "2";
  24. }
  25.  
  26. date_default_timezone_set('America/Mexico_City');
  27. ?>`
Add Comment
Please, Sign In to add comment