Skip to content Skip to sidebar Skip to footer

Front End Mysql, Deleting A Row

i'm creating a front end to view a mysql database with options to filter by certain criteria (such as age and sex) as well as options for deleting specific entries in the database.

Solution 1:

In the onclick event of each button which is generated through php, store the row ID as the parameter of the function which sends that parameter to your delete.php.

Example:

In the php which generates each of your delete buttons:

echo'<input type="button" value="Delete" onclick="delete('. $row_ID .')" />';

Then just make the corresponding AJAX function delete(row_id) in your javascript which will pass that parameter as part of the request to your delete.php.

Post a Comment for "Front End Mysql, Deleting A Row"