Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- echo "Usted esta identificado como: ".$_SESSION['user_id']."<br>";
- ?>
- <!DOCTYPE html>
- <!--
- To change this license header, choose License Headers in Project Properties.
- To change this template file, choose Tools | Templates
- and open the template in the editor.
- -->
- <html>
- <head>
- <meta charset="UTF-8">
- <title></title>
- </head>
- <body>
- <?php
- $user=$_SESSION['user_id'];
- $pass=$_SESSION['pass'];
- echo "Usuario: ".$user." y ".$pass."<br>";
- $servername = "localhost";
- $dbname = "tarea";
- $conn = mysqli_connect($servername, $user, $pass, $dbname);
- if (!$conn) {
- echo "No se pudo establecer la conexion con el servidor"."<br>";
- }
- $consulta = "SELECT * FROM origen where Nombre = '".$_POST['nombre_origen']."'";
- $result = mysqli_query($conn,$consulta);
- if (mysqli_num_rows($result)>0){
- $Lugar_ID=$result['ID_lugar'];
- $consulta=
- }
- foreach ($result as $fila) {
- echo "id: " . $fila["ID_Lugar"] . " El nombre: " . $fila["Nombre"] . "<br>";
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement