php mysql insert
Hi, I'm rookie in php and i tried to figure out myself how to write that code.
A new member signup as new member and send data value to mysql database name 'temp_member' table aand then admin will need for approval.
if admin approve this is just press button to transfer data value from 'temp_member' table to other table name 'per_member'.
my question is that how can i write that code to transfer profile information from table to other table like from 'temp_member' to 'per_member'.
please help thanks.
Personally, my suggestion would be to just use the same table, but add some sort of status column you can use to indicate whether or not they are approved. Then you just add a check on that column any time you do a query to see if they are an authorized user, and when an admin authorizes them, you just update that column's value. If you decide to stick with separate tables, you can just do something like:
$sql = "INSERT INTO per_member (login_name, password, something_else)
SELECT login_name, password, something_else FROM temp_member
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Add status column and use the same table
You will generate the unique key to insert your data in database table and run SQL queries from a PHP script.
corporate training companies in jaipur
Php mysql insert basically a way to inserting data. It uses a insert in to statement to insert data. This statement work in to two forms .The first form doesn't specify the column names where the Data will be inserted, only their values: The second form specifies both the column names and the values to be inserted.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)