B-knotty Posted April 21, 2007 Share Posted April 21, 2007 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! Link to comment https://forums.phpfreaks.com/topic/48010-solved-i-need-help-adding-a-delete-button-to-one-of-my-script/ Share on other sites More sharing options...
Lumio Posted April 21, 2007 Share Posted April 21, 2007 You lost an ending } of your if (isset($_GET['delete_id'])) It isn't closed Link to comment https://forums.phpfreaks.com/topic/48010-solved-i-need-help-adding-a-delete-button-to-one-of-my-script/#findComment-234712 Share on other sites More sharing options...
B-knotty Posted April 21, 2007 Author Share Posted April 21, 2007 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. Link to comment https://forums.phpfreaks.com/topic/48010-solved-i-need-help-adding-a-delete-button-to-one-of-my-script/#findComment-234727 Share on other sites More sharing options...
B-knotty Posted April 21, 2007 Author Share Posted April 21, 2007 I've managed to solve the problem , but thanks anyway! Link to comment https://forums.phpfreaks.com/topic/48010-solved-i-need-help-adding-a-delete-button-to-one-of-my-script/#findComment-234769 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.