runnerjp Posted August 2, 2008 Share Posted August 2, 2008 here are my bits of code <form name='input' action='index.php?page=delete&msgid=<?php echo $_REQUEST['msg_id'];?>' method='post'> <input name="delete" type="submit" class="submit-btn" value=""> </form> <?php if(isset($_POST['delete'])) { $delete="DELETE FROM messages WHERE id='$getthreads3[reportreason]'"; mysql_query($delete) or die("Could not delete post"); //insert post print "deleted "; } ?> ##but for somereason it will not delete... am i missing something here? Quote Link to comment https://forums.phpfreaks.com/topic/117872-solved-db-will-not-be-deleted-s/ Share on other sites More sharing options...
Adam Posted August 2, 2008 Share Posted August 2, 2008 try showing the mysql error.. mysql_query($delete) or die("Error: " . mysql_error()); Quote Link to comment https://forums.phpfreaks.com/topic/117872-solved-db-will-not-be-deleted-s/#findComment-606285 Share on other sites More sharing options...
maxudaskin Posted August 2, 2008 Share Posted August 2, 2008 Try $delete="DELETE FROM messages WHERE id='" . $getthreads3['reportreason'] . "'"; Quote Link to comment https://forums.phpfreaks.com/topic/117872-solved-db-will-not-be-deleted-s/#findComment-606287 Share on other sites More sharing options...
wildteen88 Posted August 2, 2008 Share Posted August 2, 2008 Can you tell use where (or how) is the $getthreads3['reportreason'] variable defined? Quote Link to comment https://forums.phpfreaks.com/topic/117872-solved-db-will-not-be-deleted-s/#findComment-606292 Share on other sites More sharing options...
runnerjp Posted August 2, 2008 Author Share Posted August 2, 2008 ahhh how silly of me... it should me $get ty guys Quote Link to comment https://forums.phpfreaks.com/topic/117872-solved-db-will-not-be-deleted-s/#findComment-606294 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.