Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. session_start();
  2. if (!isset($_SESSION['user_login_status']) AND $_SESSION['user_login_status'] != 1) {
  3. header("location: index.php");
  4. exit;
  5. }
  6.  
  7. $sql="SELECT tabla1.id,tabla2.id,tabla2.identificacion,tabla2.nombre,tabla2.apellido,tabla3.estatus,tabla1.referencia from tabla3 inner join tabla1 on tabla1.id=tabla3.id_pro right join tabla2 on tabla2.id=tabla1.id_pe and tabla1.tipo='2' where tabla3.id_usuario='". $_SESSION['user_id'] ."' group by tabla3.id_pro order by tabla1.id asc";
  8.  
  9. $ressql=mysql_query($sql,$conexion);
  10. while ($row=mysql_fetch_row ($ressql)){
  11. $id_tabla1=$row[0];
  12. $id_tabla2=$row[[1]];
  13. $identificacion=$row[2];
  14. $tabla2_nombre=$row[3];
  15. $tabla2_apellido=$row[4];
  16. $tabla3_estatus=$row[5];
  17. $tabla1_referencia=$row[6];
  18.  
  19. $_SESSION['identificador_1'] = $primer_valor_que_deseas_enviar;
  20. $_SESSION['identificador_2'] = $segundo_valor_que_deseas_enviar;
  21.  
  22. // compruebas que los $_SESSION no estén vacíos
  23. if(isset($_SESSION['identificador_1']) && isset($_SESSION['identificador_2'])) {
  24. $valor_1_recibido = $_SESSION['identificador_1'];
  25. $valor_2_recibido = $_SESSION['identificador_2'];
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement