Guest User

Untitled

a guest
Feb 2nd, 2018
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. <?php
  2. $servername = "xxx.xxx.x.xx";
  3. $username = "xxxxx";
  4. $password = "xxxxxx";
  5. $dbname = "xxxxxxx";
  6.  
  7. $conn = new mysqli($servername, $username, $password, $dbname);
  8. $conn->set_charset('utf8');
  9.  
  10. if(isset($_POST['data']))
  11. {
  12. $inicio = $_POST['data'];
  13.  
  14. $result_cursos = "SELECT `regOratorio`.`DataEntrada`,
  15. `regOratorio`.`Utente`,
  16. `regOratorio`.`Estado`,
  17. `regOratorio`.`Observacao`,
  18. `regOratorio`.`Colaborador`
  19. FROM `centrodb`.`regOratorio` WHERE DataEntrada = '$inicio'";
  20.  
  21. $resultado_cursos = mysqli_query($conn, $result_cursos);
  22.  
  23. $tabela1 .= '<div style="float: center">';
  24. $tabela1 .= '<table border="5">';
  25. $tabela1 .= '<tr>';
  26. $tabela1 .='<thead>';
  27. $tabela1 .= '<tr>';
  28. $tabela1 .= '<th>Data</th>';
  29. $tabela1 .= '<th>Utente</th>';
  30. $tabela1 .= '<th>Estado</th>';
  31. $tabela1 .= '<th>Observação</th>';
  32. $tabela1 .= '<th>Colaborador</th>';
  33. $tabela1 .= '</tr>';
  34. $tabela1 .='</thead>';
  35. $tabela1 .='<tbody>';
  36.  
  37. while($rows_cursos = mysqli_fetch_array($resultado_cursos)) {
  38.  
  39. $tabela1 .= '<tr>';
  40. $tabela1 .= '<td>'.$rows_cursos['DataEntrada'].'</td>';
  41. $tabela1 .= '<td>'.$rows_cursos['Utente'].'</td>';
  42. $tabela1 .= '<td>'.$rows_cursos['Estado'].'</td>';
  43. $tabela1 .= '<td>'.$rows_cursos['Observacao'].'</td>';
  44. $tabela1 .= '<td>'.$rows_cursos['Colaborador'].'</td>';
  45. $tabela1 .= '</tr>';
  46. }}
  47. $tabela1 .= '</tr>';
  48. $tabela1 .='</tbody>';
  49. $tabela1 .= '</table>';
  50. $tabela1 .= '</div>';
  51. echo $tabela1;
  52. ?>
Add Comment
Please, Sign In to add comment