PHP Code:
// rest of code..
$sql = "SELECT * FROM suppliers WHERE supplier_id = '".$supplier_id."'";
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
/* do something like */
echo '<table width="700" cellpadding="5" cellspacing="0" border="1">';
# row 1
echo '<tr><td><h4>'.'Supplier Name:' . '</td><td>' . $row['supplier_name'] . ' ' . '</h4></td></tr>';
# row 2
echo '<tr><td><h4>'.'Reference Number:' . '</td><td>' . $row['supplier_ref_number'] . ' ' . '</h4></td></tr>';
// and so on
// hope you see what i mean, if i understood you correctly :)
echo '</table>'; // end table
}
?>
that would echo the results into a table with each 'line' in a new row
you just need to put a <tr><td> before each <h4>, and after the heading put </td>.. then when you display the actual data, open a new column with <td> and close it with </td></tr> after the </h4>
Bookmarks