sungkono 0 Newbie Poster

hii all,
i've create upload website,
i've been stuck with following error
i had 3 tables in my database
table request, table upload and table feedback
table request :
id_request;---primary key
subjek;
isi;
pelaksana;

table upload :
id_upload,----primary key
id_request,----foreign key
filename,
filedata,
filesize,
filetype

table feedback :
id_feedback,----primary key
id_request,----foreign key
feedback,

id_request in table request is auto_increment
then i want to insert it to table upload and table feedback the id_request as foreign key in the same time
how to insert that?
because i was use last insert id it doesn't work
i'm using each queries to insert that

the queries looking like this :

$fk = mysql_query("insert into feedback (id_request) select id_request from request where id_request = LAST_INSERT_ID()");
$foreign = mysql_query("insert into uploads (id_request) select id_request from request where id_request = LAST_INSERT_ID()");

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.