Hi Ben, first of all great thanks to you for this script and it is going to help me a lot at work. I was actually setting it up with our own database and added all the row names and so on. Editing, adding, viewing results works just fine. But the only problem I dealing with is when I try to delete any existing record. I believe that whenever I change
DELETE FROM content WHERE id_number=$id_number
in delete.php file ($id_number is the row in my custom database so had to change it), it shows different error each time. Right now if I have it like that then I get an error saying
But then If I change mysql_query to
DELETE FROM content WHERE id_number='$id_number'
then it will not delete that file but will redirect me to listed location. Would you please help me figure out the problem?
Here is the whole delete.php here if you need to go through it:
Deletes a specific entry from the 'content' table
// connect to the database
// check if the 'id' variable is set in URL, and check that it is valid
if (isset($_GET['id_number']) && is_numeric($_GET['id_number']))
// get id value
$id = $_GET['id_number'];
// delete the entry
$result = mysql_query("DELETE FROM content WHERE id_number='$id_number'")
// redirect back to the view page
// if id isn't set, or isn't valid, redirect back to view page
Thank you in advance Mr. Falk.