How to output a table in PHP?

pandemonium7386

New member
I have a table named "carsTbl" in mySQL, but how would I output that table in using a PHP script? I have tried this code

<?php
include("dbLogin.php");

mysql_connect(localhost,$username,$password) or die("cannot connect");
mysql_select_db($database) or die("Unable to select database");

$query = select * from carsTbl;
$result = mysql_query($query);

mysql_close();
?>

and this does nothing. Any ideas?
 
Back
Top