www.webdeveloper.com
Results 1 to 5 of 5

Thread: php mysql insert

  1. #1
    Join Date
    Aug 2006
    Posts
    57

    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.

    AM

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,222
    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='"
    .mysql_real_escape_string($loginName)."'"
    "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

    eBookworm.us

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

  4. #4
    Join Date
    Oct 2012
    Posts
    17
    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



Recent Articles