Hello Lordshryku,
Thats the idea that i have, and thank you very much, But im getting a error and i have tried to work it out.
here is the error:
Fatal error: Call to undefined function: mysql_num_row() in /home/httpd/vhosts/xxxxxx.xxxxxxx.xxx/httpdocs/tables.php on line 16
my code:
<?php
$conn = mysql_connect("localhost", "xxxxx", "xxxxx");
mysql_select_db("cdorder", $conn);
$sql = "SELECT * FROM cd_order (Client_ID,First_Name,Last_Name,Address,Apartment,City,State,Zip_code)";
$res = mysql_query($sql);
if(mysql_num_row($res)>0) {
/* If we have rows, build the table header */
echo "<table border=\"1\">
<tr>
<th align=\"center\">Client ID</th>
<th align=\"center\">Name</th>
<th align=\"center\">Address</th>
<th align=\"center\">City</th>
<th align=\"center\">State</th>
<th align=\"center\">Zip</th>
</tr>";
while($row=mysql_fetch_array($res)) {
echo "<tr>
<td>".$row['Client_ID']."</td>
<td>".$row['First_Name']." </td>
<td>".$row['Address']."</td>
<td>".$row['City']."</td>
<td>".$row['State']."</td>
<td>".$row['Zip_Code']."</td>
</tr>";
}
echo "</table>";
}
else {
echo "No rows found";
}
?>