Hey guys. I have a code for uploading an image that was on a register globals on server. I handled the image uploading like so
If (!empty($btnImage)){
If ((!$btnImage_type == "image/pjpeg" AND !$btnImage_type == "image/jpeg") OR !$btnImage_type == "image/gif"){
$Error .= "Image must be in either .jpg or .gif format.<br>";
}
// Check To Make Sure Image Is Of Right Dimensions //
$ImageSize = getimagesize($btnImage);
$ImageWidth = $ImageSize[0];
$ImageHeight = $ImageSize[1];
//If ($ImageWidth > 500)$Error .= "<img src=\"../images/bullet.gif\" border=0>Image is not the correct size, it must be less than 500 pixels wide.<br>";
}
But now I have to use $_FILES since it is on a server with register globals off.
I have tried just putting $btnImage=$_FILES['btnImage']; at the top of the page, but that doesn't work.
Also I don think I can use the $btnImage_type or things like that now...do I have to use $_FILES['btnImage'].type or something like that?
Thanks for any input!
😃