Results 1 to 5 of 5

Thread: php mysql insert

  1. #1
    Join Date
    Aug 2006

    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.


  2. #2
    Join Date
    Aug 2004
    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:
    PHP Code:
    $sql "INSERT INTO per_member (login_name, password, something_else)
    SELECT login_name, password, something_else FROM temp_member 
    WHERE login_name='"
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  3. #3
    Join Date
    Oct 2012
    Add status column and use the same table

  4. #4
    Join Date
    Oct 2012
    You will generate the unique key to insert your data in database table and run SQL queries from a PHP script.

  5. #5

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center