hi can anyone help me with this ive trying for 2days to get this sorted but cant figure it out. i want to be able to list my data in the table which works fine then i want a link next to each data line to amend it heres my code so far.
<?php
$db = mysql_connect("localhost", "", "");
mysql_select_db(db) or die ('Unable to connect to database');
$q="SELECT * FROM mobilephones";
$result = mysql_query( $q )
or die(" - Failed More Information:<br><pre>$q</pre><br>Error: " . mysql_error());
$num_rows = mysql_num_rows($result);
if ($myrow = mysql_fetch_array($result)) {
echo "<br>A Quick View<BR><br>";
echo "<table border=1>\n";
echo "<tr><td><b>make</b></td><td>model</td><td>camera</td><td>bluetooth</td><td>internet</td><td>smartphone</td></tr>\n";
do {
printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>\n", $myrow["make"], $myrow["model"], $myrow["camera"], $myrow["bluetooth"], $myrow["internet"], $myrow["smartphone"]);
} while ($myrow = mysql_fetch_array($result));
echo "</table>\n";
} else {
echo "$ref: That record appears to be unavailable";
}
mysql_free_result($result);
mysql_close($db);
?></DIV></TD></html>
any help wud be great. thanks