Start by formatting your code. Add ``` on the line before and after your code.
Nov 11, 2021
8
Level 1
Php image convert to jpg
I want to save the image to be uploaded as jpg imagejpeg
$hedef = "upload";
$kaynak = $_FILES["image"]["tmp_name"];
$name = $_FILES["image"]["name"];
$newimages=$txt_listnum."-".mt_rand()."-fieldotels-".$name;
$extension = pathinfo($newimages, PATHINFO_EXTENSION);
$save = move_uploaded_file($kaynak,$hedef."/".$newimages);
mysqli_query($con,"UPDATE fields SET listnum='$txt_listnum',name='$txt_name',location='$txt_location',path='$newimages' WHERE id='$id' ");
Please or to participate in this conversation.