you probably think im crazy as i know this is a easy question but i cannot work it out at all. I was here all night working out a silly error and realised i was just inserting data and then asking to display the data in a table without telling it what to display - doh
anyway i have got my php adding to my database, i just need it to echo the table, so i need a select * from customer but i already have a $query = insert .... into ..... and then...
$result = mysql_query($query);
$numrows = mysql_num_rows($result);
if ($numrows == 0) {
echo "No data to display!";
exit;
}
echo ?>
<table border="1"><tr><th>firstName</th><th>lastName</th><th>address</th><th>dateOfBirth</th><th>telephoneNo</th></tr>
<?
while($row = mysql_fetch_assoc($result))
{
?>
<tr><td><input type="text" value="<? echo $row["firstName"] ?></td><td><? echo $row["lastName"] ?></td><td><? echo $row["address"] ?></td><td><? echo $row["dateOfBirth"] ?></td><td><? echo $row["telephoneNo"] ?>">
</td></tr><?}?>
so where can i say select * from customer to actually display the updated table?
i'm baffled!