Ok gents, I've started getting to grips with this now.
I want to display two fields from a MySQL table on to the webpage, so I've done this
That works great.
But what I want to do is provide a tick box (I guess) in the displayed table which if user clicks 'OK', 'Update' or whatever, drops that row from the table.
I'm not sure how to do this bit.
Thanks
I want to display two fields from a MySQL table on to the webpage, so I've done this
Code:
<?php
$address = "localhost";
$username = "root";
$password = "";
$database = "mark1e_dmd";
mysql_connect($address,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query = "SELECT p_title, p_summary FROM news";
$result = mysql_query($query)
or die("Query failed : " . mysql_error());
print "<table border=1>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
print "\t<tr>\n";
foreach ($line as $col_value) {
print "\t\t<td>$col_value</td>\n";
}
print "\t</tr>\n";
}
print "</table>\n";
mysql_free_result($result);
mysql_close();
?>
That works great.
But what I want to do is provide a tick box (I guess) in the displayed table which if user clicks 'OK', 'Update' or whatever, drops that row from the table.
I'm not sure how to do this bit.
Thanks