Hi,
I have a simple script that connects to my MySQL database, and shows me the data that I have requested in a table layout.
I have searched a few guides and I am struggling with the next bit though, I want to display a checkbox at the end of each row and select and then a button to delete. Any ideas on how I can do this?
here is my code so far that calls the information
[code=php]<?
mysql_connect(“”,””,””) or die(mysql_error());
mysql_select_db(“”) or die(mysql_error());
$query = “SELECT * FROM “;
echo “<table style=’width:100%’><tr>”;
echo “<td>Title</td>”;
echo “<td>Name</td>”;
echo “<td>Company</td>”;
echo “<td>Address1</td>”;
echo “<td>Address2</td>”;
echo “<td>Town</td>”;
echo “<td>County</td>”;
echo “<td>Postcode</td>”;
echo “</tr>”;
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)){
echo “<td>”.$row[‘title’].”</td>”;
echo “<td>”.$row[‘name’].”</td>”;
echo “<td>”.$row[‘company’].”</td>”;
echo “<td>”.$row[‘address1’].”</td>”;
echo “<td>”.$row[‘address2’].”</td>”;
echo “<td>”.$row[‘town’].”</td>”;
echo “<td>”.$row[‘county’].”</td>”;
echo “<td>”.$row[‘postcode’].”</td>”;
echo “</tr>”;
}
echo “</table>”;
echo “<br />”;
?>