Jump to content

[SOLVED] I need help adding a delete button to one of my script


B-knotty

Recommended Posts

The whole code to my script is here

 

http://rafb.net/p/RWemd447.html

 

but when I run it I get this error message

 

Parse error: syntax error, unexpected $end in C:\RudeBoyDesigns\RudeBoyDesigns\web-content\admin_contact.php on line 131

 

Can someone please point me in the right direction, I badly need help!

 

Thanks a lot.

 

Oh and this is my first post, so its nice to meet you all!

Thanks, I'm no longer getting that error message, but the delete button still isn't working.

 

if (isset($_GET['delete_id']))
//check to see if the delete button has been passed to the script 
{
		$query = 'DELETE FROM contact WHERE autoid = "'.$_GET['delete_id'].'"';

		if (!mysql_query($query, $db_link))
		{
	 		echo mysql_error();
	 		exit;
		}

}

 

 

I was sure that should delete it.

 

this script works by someone filling in a contact form sending it, that information is feed into the contact table, then that information is queried and displayed on another page (Admin_contact). But I wanted to add a delete button to each message so after its read it can easily be deleted, I was sure thats how its done. But when I click it the page refreshes but nothing happens.

 

However thanks very much for the help so far, at least it does something.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.