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.
i used this http://www.tizag.com/ajaxTutorial/ajaxxmlhttprequest.php as a guide to build everything.
so far this is what i have: view.php - authenticates user, creates basic html with input boxes in order to define the filters, a submit button, javascript function that reads the values from the input boxes and calls ajax.php, basic html to display results of mysql query.
ajax.php - connects to the mysql DB, gets the input values from view.php, builds the mysql query from the input values, creates a table of all the mysql query result which is displayed by view.php.
within each row of the mysql query result, i have an html input button which, onclick, calls a javascript function intended for deleting the specific row. so each row has it's own delete button. this delete function right now resides in view.php.
my intention, is that the delete js function will call another file, say delete.php and that delete.php will activate the mysql query to delete the specific row based upon which delete button was clicked.
the only part i don't have working correctly is how to pass the correct row ID to delete.php.
any thoughts?