Hi,
I am very new to php still trying to find my way around it, i got this code which will pull everything off my database and display in one endless table across the page is there a way i can split it and display.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>
<body>
<p>
<table border="1" bordercolor="black" cellpadding="3">
<?php
$db_connect="localhost";
$db_username="xxxx";
$db_password="******";
$db_name="xxx****";
$link=mysql_connect($db_connect,$db_username,$db_password);
$db_select=mysql_select_db($db_name);
if ($db_select) {
print "database connected";
}else{
print "not connected";
}
//print "<table>";
$record_set=mysql_query("SELECT * FROM tableToDisplay");
for($c=0; $c<mysql_num_fields($record_set);$c++){
print"<th>".mysql_field_name($record_set,$c)."</th>";
}
while ($record=mysql_fetch_row($record_set)){
print"<tr>";
for($c=0; $c<mysql_num_fields($record_set);$c++){
print "<td>".$record[$c]."</td>";
}
print "</tr>";
}
//print"</table>";
mysql_close($link);
?>
</table>
</body>
</html>