garydt Posted July 17, 2007 Share Posted July 17, 2007 I've got- mysql_query("DELETE FROM guestbook WHERE id = '$recnum'"); It works fine on my local server but it doesn't delete records on the remote server. any ideas? Link to comment https://forums.phpfreaks.com/topic/60350-records-wont-delete/ Share on other sites More sharing options...
tapos Posted July 17, 2007 Share Posted July 17, 2007 Check you have enough permission to delete on a table. -- Tapos Pal Link to comment https://forums.phpfreaks.com/topic/60350-records-wont-delete/#findComment-300246 Share on other sites More sharing options...
matto Posted July 17, 2007 Share Posted July 17, 2007 Does your local server have register_globals set to "On" You may find that one of these might fix your problem: mysql_query("DELETE FROM guestbook WHERE id = '" . $_GET['recnum'] . "'"); or mysql_query("DELETE FROM guestbook WHERE id = '" . $_POST['recnum'] . "'"); Link to comment https://forums.phpfreaks.com/topic/60350-records-wont-delete/#findComment-300262 Share on other sites More sharing options...
garydt Posted July 17, 2007 Author Share Posted July 17, 2007 Thanks Do you know to set/change the permissions in PHPYADMIN to allow my pages to delete records in tables? I've looked, theres nothing that i can see. Link to comment https://forums.phpfreaks.com/topic/60350-records-wont-delete/#findComment-300338 Share on other sites More sharing options...
matto Posted July 19, 2007 Share Posted July 19, 2007 I know you can perform these tasks from MySQL Administrator. http://dev.mysql.com/downloads/gui-tools/5.0 If you are wanting to GRANT permissions for users you will need to have root access.... Link to comment https://forums.phpfreaks.com/topic/60350-records-wont-delete/#findComment-302203 Share on other sites More sharing options...
JasonLewis Posted July 19, 2007 Share Posted July 19, 2007 and for the sake of your query maybe containing an error... make it like this: mysql_query("DELETE FROM guestbook WHERE id = '$recnum'") or die("Error in mysql. Error returned was: ".mysql_error()); good luck. Link to comment https://forums.phpfreaks.com/topic/60350-records-wont-delete/#findComment-302237 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.