Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $con = mysqli_connect ("localhost", "joaopaulofcc", "jp1993jp", "teste");
- if (mysqli_connect_errno())
- {
- echo "Falha ao conectar no MySQL: " . mysqli_connect_error();
- }
- $result = mysqli_query($con,"SELECT * FROM usuario");
- echo "<table border='1'>
- <tr>
- <th>UID</th>
- <th>Nome</th>
- <th>Endereco</th>
- </tr>";
- while($row = mysqli_fetch_array($result))
- {
- echo "<tr>";
- echo "<td>" . $row['UID'] . "</td>";
- echo "<td>" . $row['Nome'] . "</td>";
- echo "<td>" . $row['Endereco'] . "</td>";
- echo "</tr>";
- }
- echo "</table>";
- mysqli_close($con);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement