Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <?php
- $link = mysqli_connect ("localhost", "nome_usuario", "senha_usuario", "teste");
- $query = "SELECT * FROM usuario";
- $result = mysqli_query ($link, $query);
- /* Mostrando os resultados em HTML */
- echo "<table>\n";
- while ($line = mysql_fetch_array($result, MYSQL_ASSOC)){
- echo "\t<tr>\n";
- foreach ($line as $value){
- echo "\t\t<td>$value</td>\n";
- }
- echo "\t</tr>\n";
- }
- echo "</table>\n";
- /* Libera o conjunto de resultados */
- mysqli_free_result($result);
- /* Fechando a conexão */
- mysqli_close($link);
- ?>
- <form action="index.html" method="post">
- Voltar: <input type="submit" />
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement