// Picture
if ($fileupload) {
$array_last=explode(".",$fileupload_name);
$c=count($array_last)-1;
$lastname=strtolower($array_last[$c]) ;
if ($lastname=="gif" or $lastname=="jpg" or $lastname=="jpeg") {
$sql2="select max(id) from product ";
$result2=mysql_db_query($dbname,$sql2);
$row=mysql_fetch_row($result2);
$photoname=$row[0].".".$lastname;
copy($fileupload,"photo/".$photoname);
$sql3="update product set pic='$photoname' where id ='$row[0]' ";
$result3=mysql_db_query($dbname,$sql3);
}
unlink($fileupload);
}
Tag : PHP
Date :
2013-09-10 00:43:48
By :
dd
View :
568
Reply :
2
No. 1
Guest
Code
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\we\domains\thai-ideafurniture.com\public_html\back\add_product.php on line 47