PHP/MYSQL Help? How to delete records from mysql database?

reis

New member
i have echoed out all the records in a table in my database in the form of a table. i want to be able to delete certain records by clicking a "delete' link but i am having a little bit of trouble with this part. does anyone know how to do this
code is below:

echo "<table border='1'>
<tr>
<th>Registration</th>
<th>Vehicle Make</th>
<th>Vehicle Model </th>
<th>Registered Driver</th>
<th>Vehicle Colour</th>
</tr>";// table to display records neatly

while($row = mysql_fetch_array($result))
{

echo "<tr>";
echo "<td>" . $row['rego'] . "</td>";
echo "<td>" . $row['make'] . "</td>";
echo "<td>" . $row['model'] . "</td>";
echo "<td>" . $row['driver'] . "</td>";
echo "<td>" . $row['colour'] . "</td>";
echo "<td>" . '<a href="">Delete</a>' . "</td>";
echo "</tr>";
}

echo "</table>";
 
Back
Top