How to update two database tables as the same Usernamethats logged in?


i have created 2 separate database tables in php/mysql want store user information in. first user table made fields: id, username, password. second table made fields: id, firstname, lastname, address, phone.

i want make update record page restricted username , password update both table1 , table 2 mysql database.

i have created registration page, login page , restricted page when user signs in. on restricted page want update users information.

i have tried few things , can table has username field update, can't second table update first table.

it's not clear description whether have created relationship between 2 tables. both have id column, presumably record's primary key, need create relationship storing primary key of 1 table foreign key in child (related) table. example, should insert primary key of first table in second table user_id. enables identify username , password related individual listed in second table.

 

without foreign key relationship between tables, you'll fast.



More discussions in Develop server-side applications in Dreamweaver


adobe

Comments

Popular posts from this blog

CS5 Adobe Media Encoder: Encode failed because the source duration is nil.

cf_sql_integer vs cf_sql_bigint vs cf_sql_int??

localhost/joomla15/administrator doesnt work - Joomla! Forum - community, help and support