I am trying to build an image upload script, but am running into a few issues.
Once the images are uploaded, im trying to determine the type by looking at the format, and to simply copy the image using all those if statements things, is this right?
PHP Code:
$ext pathinfo($imgPATHINFO_EXTENSION);        
if (
$ext == "png") {
$new imagecreatefrompng($img);
} elseif  (
$ext ==  "gif") {
$new imagecreatefromgif($img);
} elseif (
$ext == "jpg") {
$new imagecreatefromjpeg($img);
} elseif (
$ext == "bmp") {
$new imagecreatefromwbmp($img);