$id=$_POST['id']; $title=$_POST['title']; $desc0=$_POST['desc0']; $content=$_POST['content']; $category=$_POST['category']; $random = substr(number_format(time() * rand(),0,'',''),0,00);  $img= $random .$_FILES['image']['name'][0]; $image_tmp= $_FILES['image']['tmp_name'][0]; $img0= $random .$_FILES['image']['name'][0]; $image_tmp0= $_FILES['image']['tmp_name'][0]; if(move_uploaded_file($image_tmp,"images/$img")){ move_uploaded_file($image_tmp0,"images/$img0"); $stmt = $con->prepare("UPDATE products SET title=?, desc0=?, content=?,  category=?,img=?,img0=?  WHERE id=?");  $stmt->bind_param("sssssss", $title, $desc0, $content,  $category, $img,$img0, $id); }