Örneğin: Width 300px height ise otomatik olarak ayarlansın
Şuanki çalışan upload kodum(orjinal resim gidiyor sadece)
$kaynak = $_FILES["resim"]["tmp_name"];
$resimboyutal = getimagesize($kaynak);
$dosya = str_replace(" ", "_", $_FILES[resim][name]);
$uzanti = explode(".", $_FILES[resim][name]);
$hedef = "wallpapers/".$dosya;
if ($uzanti[1] == "jpg" || $uzanti[1] == "bmp" || $uzanti[1] == "JPG" || $uzanti[1] == "gif" || $uzanti[1] == "GIF" || $uzanti[1] == "png" || $uzanti[1] == "PNG" || $uzanti[1] == "TIF" || $uzanti[1] == "TIFF" ) {
if (file_exists($hedef)) {
$rastgele = rand(0,10000);
$hedef = "wallpapers/$rastgele-".$dosya;
$dosya = "$rastgele-".$dosya;
}
move_uploaded_file($kaynak,$hedef);
}$hedef değişkeni ile db ye insert ediyorum
Yardımcı olursanız sevinirim