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? Quote Link to comment 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 Quote Link to comment 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'] . "'"); Quote Link to comment 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. Quote Link to comment 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.... Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.