Activate and deactivate concept using php and mysql

Must Read : Activate and deactivate concept using php and mysql

This is the concept for activate and deactivate the account or user to display in the page. that’s why we are using this coding. this concept is known by all like block or unblock the user or some other thing. here going to show you that how make activate and deactivate the accounts. this is what using in the most of the social media and more other user management sites are need this concept. let see the details about the coding and some other things.
this concept is whether we have to display the details of it or not. here i’m showing that in a single page. how to make activate and de-activate the accounts. this concept should not display the details of user and any of the product details in the page when you deactivate the account. let see what are all needed to do that.
FILES :
  1. db.php
  2. index.php
  3. action.php
the above three files must be needed to do this action.
DATABASE DETAILS :
database name : wearecoders
table name : tablename

column names : id, detail, status

here the status is important, because there only the action should be performs. the status must be 0 or 1. 1 means the product is in active state. 0 means not active state.

DB.PHP

INDEX.PHP

in an achor tag we just give a link to id of status and used onclick function to activate and de-activate concept. if the status is 0 means activate and 1 means de-activate.

ACTION.PHP

In an action page. make the condition in if statement. and use update coding for make activate and de-activate concept. just make 0 and 1 condition.
(Visited 49 times, 1 visits today)

Leave a Comment.