1
Hi, I’m doing a movie site and would like a help on that part.
After getting a connection to the BD, I want each record to appear within the grid that I made.
I’ll explain it better with pictures.
Each film has its record containing every piece of information I wish to manipulate.
Above shows how I call mine script PHP that contains the BD connection. but it shows the 2 records in the same place, wanted the film 1 to be at the location of the 1 and so on. follows the grid of layout!
This is the PHP file
<?php
$conecta = mysql_connect("127.0.0.1", "root", "") or print (mysql_error());
mysql_select_db("bd", $conecta) or print(mysql_error());
$filmes = mysql_query("SELECT * FROM filmes");
while($dados = mysql_fetch_array($filmes)){
echo $dados['nome'] . "<br>";
echo $dados['sinopse'] . "<br>";
echo $dados['categoria'] . "<br>";
}
?>
Gustavo, the OS does not accept PHP tags, try playing your example on the following site: http://phpfiddle.org/
– MarceloBoni
This last snippet would be your get.php?
– Rafael Withoeft
yes, he’s basically for connection.
– Gustavo Lucksik
Then you can assemble your structure within the while...
– Rafael Withoeft