coupe-r Posted January 18, 2011 Share Posted January 18, 2011 Hi all, I'm just wondering how everyone deletes their records using PHP or if you can give me any recommendations. Not really deleting, but I use UPDATE and change the deleteStatus column value. What is the best / recommended way, with a customer confirmation? Quote Link to comment Share on other sites More sharing options...
requinix Posted January 18, 2011 Share Posted January 18, 2011 Whether you actually delete the data, move it off into a separate (eg, backup) table, or just flag it as "deleted" depends on the business. If you need to send a confirmation then you should probably use a flag. If uncontested, you can have a periodic backup routine move the "deleted" data someplace else - for archival purposes. Quote Link to comment Share on other sites More sharing options...
coupe-r Posted January 18, 2011 Author Share Posted January 18, 2011 Thanks for the reply. Currently I use a deleteStatus flag along with a JS confirmation box. But, I just had a friend test it out and when they click my delete icons, it just runs the PHP code and never pops up a message. I'm looking for a way around that. I can post my short PHP and JS code if you want, but didn't want to post JS in here since its the PHP forum Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted January 18, 2011 Share Posted January 18, 2011 If the user has javascript disabled, it won't matter what message you try to pop-up; the code will just execute. If you absolutely must have a confirmation dialog presented to the user, you'd need to write it server-side. 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.