$book_id = mysql_insert_id(); // เรียก book_id จากอีก update
for($i=0;$i<count($_FILES["contents_img"]["name"]);$i++)
if(copy($_FILES["contents_img"]["tmp_name"],"myfile/".$_FILES["contents_img"]["name"][$i]))
{
{
$sql1="update INTO contents
(book_id,contents_img)
VALUES($book_id,'".$_FILES['contents_img']['name'][$i]."',)";
$sql1 = "update contents set
book_id='$book_id',
contents_img='$contents_img'
where book_id=$id";
$query=mysql_query($sql1);
}
}
errer ที่ขึ่นตอนรันครับ Code
Warning: copy(Array) [function.copy]: failed to open stream: No such file or directory in C:\AppServ\www\lib_project\admin\editSavebook.php on line 166
line 166 คือ if(copy($_FILES["contents_img"]["tmp_name"],"myfile/".$_FILES["contents_img"]["name"][$i]))