Link to home
Start Free TrialLog in
Avatar of Lee-Bartlett
Lee-Bartlett

asked on

How do you echo back a database table?

I cant rember how to echo back a table in my database, evertime i echo a collum it goes like this ..  entry1entry2, with no breaks, everytime i try to put a break in, its messes it up.
Avatar of Lee-Bartlett
Lee-Bartlett

ASKER

I got it kind of working so far with the code below, how would i wrap it in a table so there is atleast spacing between the entries
<?php  require_once("includes/db_connection.php"); ?>
 
 
<?php
 
$sql = "SELECT * from tblbasicform";
$res = mysql_query($sql) or die(mysql_error());
 
 
while($row = MYSQL_FETCH_ARRAY($res))
{
echo "$row[name]";
echo "$row[email]";
echo "$row[location]<br>";
}
 
 
?>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of jericotolentino
jericotolentino
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial