I am trying my best to do a user interface script that with a click of a link it will remove a record from a table. This is what I have come up with so far.
I would like it to be to where when the user clicks on the "remove link" link, it will delete that specified record. I know the SQL for that is something along the lines of..
$connection = mysql_connect($host, $user, $password) or die ("Error with the connection to server. ");
$db = mysql_select_db($database, $connection) or die ("Could not connect to Database. ");
$query = "SELECT * FROM tbllinks";
$result = mysql_query($query) or die ("Query could not be executed. ");
while ($row = mysql_fetch_array($result))
echo "<tr><td>" . $linkURL . "</td><td>" . $linkName . "</td><td><a href=\"\">remove link</td></tr>";
..but don't know how to get it to how I want to get it.
Delete From 'tbllinks' Where 'linkid' = $linkid
If someone could please help me or point me in the right direction I would much appreciate it. Thank you for your time.