Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "xxx.xxx.x.xx";
- $username = "xxxxx";
- $password = "xxxxxx";
- $dbname = "xxxxxxx";
- $conn = new mysqli($servername, $username, $password, $dbname);
- $conn->set_charset('utf8');
- if(isset($_POST['data']))
- {
- $inicio = $_POST['data'];
- $result_cursos = "SELECT `regOratorio`.`DataEntrada`,
- `regOratorio`.`Utente`,
- `regOratorio`.`Estado`,
- `regOratorio`.`Observacao`,
- `regOratorio`.`Colaborador`
- FROM `centrodb`.`regOratorio` WHERE DataEntrada = '$inicio'";
- $resultado_cursos = mysqli_query($conn, $result_cursos);
- $tabela1 .= '<div style="float: center">';
- $tabela1 .= '<table border="5">';
- $tabela1 .= '<tr>';
- $tabela1 .='<thead>';
- $tabela1 .= '<tr>';
- $tabela1 .= '<th>Data</th>';
- $tabela1 .= '<th>Utente</th>';
- $tabela1 .= '<th>Estado</th>';
- $tabela1 .= '<th>Observação</th>';
- $tabela1 .= '<th>Colaborador</th>';
- $tabela1 .= '</tr>';
- $tabela1 .='</thead>';
- $tabela1 .='<tbody>';
- while($rows_cursos = mysqli_fetch_array($resultado_cursos)) {
- $tabela1 .= '<tr>';
- $tabela1 .= '<td>'.$rows_cursos['DataEntrada'].'</td>';
- $tabela1 .= '<td>'.$rows_cursos['Utente'].'</td>';
- $tabela1 .= '<td>'.$rows_cursos['Estado'].'</td>';
- $tabela1 .= '<td>'.$rows_cursos['Observacao'].'</td>';
- $tabela1 .= '<td>'.$rows_cursos['Colaborador'].'</td>';
- $tabela1 .= '</tr>';
- }}
- $tabela1 .= '</tr>';
- $tabela1 .='</tbody>';
- $tabela1 .= '</table>';
- $tabela1 .= '</div>';
- echo $tabela1;
- ?>
Add Comment
Please, Sign In to add comment