I have the following code:
<?php
//iniciando a conexão com o banco de dados
include_once("conectar.php");
if (!$strcon) {
die('Não foi possível conectar ao Banco de Dados');
}
$sql = mysqli_query("SELECT * FROM cadastro");
$exibe = mysqli_fetch_assoc($sql);
echo "<table>";
echo "<tr><td>Nome:</td>";
echo "<td>".$exibe["Nome"]."</td></tr>";
?>
I have tried to create the structure in several ways. The results displayed in HTML for me are:
Warning: mysqli_query () expects at least 2 parameters, 1 given in C: \ Program Files \ EasyPHP-Devserver-17 \ eds-www \ Sites \ Projects \ Schedule \ query.php on line 18
Warning: mysqli_fetch_assoc () expects parameter 1 to be mysqli_result, null given in C: \ Program Files \ EasyPHP-Devserver-17 \ eds-www \ Sites \ Projects \ Schedule \ query.php on line 19 Name:
My line 18:
$sql = mysqli_query("SELECT * FROM cadastro");
My Line 19:
$exibe = mysqli_fetch_assoc($sql);
I have already modified the parameters in several ways, but I do not find the exact problem.