(02-27-2016, 08:57 PM)Quanity Wrote: How can i make auto upgrade script which changes users usergroup when using the code given and the code can be used only ones. Well something like auto upgrade etc etc.
Store the Code in DB and mark it "Unused" using some field in the table, like "status"
Once the user uses the code, change the "status" field in the database to "Used"
Before marking it "Used" just check if the code exists in the db and its status is "Unused". If it is, proceed, otherwise, give the user a warning that the code has already been used.
Do not let your difficulties fill you with anxiety, after all it is only in the darkest nights that stars shine more brightly. - Ali(a.s)
Developer( PHP, Python, C++, HTML+CSS, JS I am available for Hire. Message Me for details.