I am struggling with this, I have a database (mysql where i am trying to delete a single row. The idea is a list of items populated from the database. I am trying to add an additional column where there is a graphic and it reloads the page and runs a script that deletes the row (a session). I cannot win for some reason. It is not my original code so please don't suggest anything ridiculous.
<a href="event_manage.php?id=<? echo $id ?>&deletesession=62"> <img src="../images/icn_del.jpg"> </a>
This was a test piece of code that simply sends 62 to the deletesession function in an included file. The event_manage.php?id=
is to load the same page view currently open at the same point.
function DeleteSession($sid)
{
$table = " tbl_event_session ";
return DeleteRecord($table, $sid);
}
This is the function that should delete the session $sid that is in the table tbl_event_session.
I'm getting no-where
DELETE FROM `theDatabase`.`tbl_event_session` WHERE `tbl_event_session`.`session_id` = 62
is also not working... so I have no idea what is going wrong.
Any help would be great