1
I needed help because I wanted to send the data from my database to the website
BASE FIELDS: Id_Produto
, NomeProduto
, PrecoProduto
,DescricaoProduto
, QuantidadeProduto
, CategoriaProduto
-
TABLE NAME: produtos
The page I’m creating is in php so I can access information from the database.
But I can’t make the code
I’m using `
mysqli_connect('localhost', 'root', '', 'pap') or die (mysqli_error ());
$strSQL = "SELECT * FROM produtos";
$rs = mysqli_query($strSQL);
while($row = mysqli_fetch_array($rs)) {
echo $row['NomeProduto'] . "<br />";
echo $row['DescricaoProduto'] . "<br />";
}
// Encerra a conexão
mysqli_close(); ?>
`
no database data is shown, but this : ("; echo $Row['Descricaoproduct'] . " "; } // Terminates connection mysqli_close(); ?>)
– José Gomes
@Joségomes try now
– edshewa
continues to make the same mistake
– José Gomes
try now @Joségomes
– edshewa
is already sending the data, but keeps this icon -> and an error still 'Warning: mysqli_close() expects Exactly 1 Parameter, 0 Given in C: xampp htdocs Site pagina_produto.php on line 459' which has the following code - mysqli_close(); ?>
– José Gomes
deletes mysqli_close(); no need; ?>
– edshewa
and as for the points of ? knows how to solve?
– José Gomes
adds this at the beginning of the code, following <html> inside <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
– edshewa
had it already and it doesn’t work
– José Gomes
and if so: <meta charset="utf-8">
– edshewa
also does not work
– José Gomes