medworthy Posted April 16, 2007 Share Posted April 16, 2007 I am having problems adding and deleting records. I am working on a simple phone messaging system using php and mysql, and am having deleting and adding records. I have attached 3 files, add.php - to add records, del.php - deletes records and view.php to (yep, you guessed it) view the records. If somebody (anybody, help!) can look through the files and tell me where I am going wrong, that would be great. -- Mark [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
Wildbug Posted April 16, 2007 Share Posted April 16, 2007 I don't think anyone wants to use their free time ploughing through your code looking for some hidden syntactic or logical error. Perhaps you could deign to give us a hint of what problem(s) you are having? Maybe even, if it's not too much to ask, an error message. And when you're posting, try to come up with a more descriptive title than "Somebody pls help!!!" Quote Link to comment Share on other sites More sharing options...
medworthy Posted April 17, 2007 Author Share Posted April 17, 2007 My problem is that I can't add or delete a record! I re-looked at my code and still can't work out why when I view add.php on-line that it does not add anything to my database. Quote Link to comment Share on other sites More sharing options...
Wildbug Posted April 17, 2007 Share Posted April 17, 2007 Why do you have the "if (isset($_POST["id"]) && !get_magic_quotes_gpc..." block twice? It looks like you accidently copied and pasted it in the middle of itself. Your code would be much more legible were it indented. Have you tried checking for MySQL errors? Have you dumped $_POST to be sure there's data in there? 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.