i have a little difficulty in understanding how to do some INSERT SELECT.
For instance i have two tables.
TABLE : users id | name | gender 1
Assuming your variables are already escaped properly and are not subject to SQL injection:
SQL
INSERT INTO website (url, fid) SELECT $site, id FROM users WHERE name = $user