Guest User

Untitled

a guest
Apr 20th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.80 KB | None | 0 0
  1. <?php
  2.     include_once 'header.php';
  3.     include_once 'menu.php';
  4.     include_once 'lib.php';
  5.     if (isset ($_GET['sigla'])) {
  6.         $siglaCont = $_GET['sigla'];
  7.         try {
  8.             $select_statement = $database->prepare("SELECT * FROM container c, noleggio n, prenotazione p WHERE c.id_tipo=p.tipo_id AND p.prenotazione_id = n.prenotazione_id AND c.sigla=':a'");
  9.             $select_statement->bindValue(':a',$siglaCont);
  10.            
  11.             $select_statement->execute();
  12.             $info_container = $select_statement->fetch();
  13.         } catch (Exception $exc) {
  14.             echo $exc->getTraceAsString();
  15.             echo $exc->getMessage();
  16.         }
  17.         echo '<div class="info_prenotazione">';
  18.        
  19.         print_r($info_container);
  20.         echo '</div>';
  21.    
  22.     }
  23. ?>
Add Comment
Please, Sign In to add comment