Database with Codes

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ebgames56
Forum Contributor
Posts: 103
Joined: Thu Oct 06, 2011 10:43 am

Database with Codes

Post by ebgames56 »

Is there anyway to have my database automatically delete the code in the database after it is put into the text box?
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Database with Codes

Post by Celauran »

Use a DELETE query on that record after the form has been submitted.

Code: Select all

$query = "DELETE FROM tablename WHERE code = '{$code_to_delete}'";
Post Reply