How to INSERT mysql data in multiple tables using one php command?

Sultan

New member
I have two tables "users" and "profile" in my "registration" database. I want that when user click register, the email of user should go in both tables("users"and"profile").

i have these fields in
"users" table:
id firstname lastname email password sex dob date

"profile" table
id email image

the query i coded in index.php is:

$queryreg = mysql_query("
INSERT INTO users VALUES ('','$firstname','$lastname','$email','$password','$sex','$dob','$date')
");

what should i do here?
 
Back
Top