Hello all,
I have a page where users can upload a jpeg to my server. I have a small bit of code the checks (or tries to check) the file extension and make sure its a .jpg or .jpeg. I can't seem to get it to work so, if anybody can help, it would be great. Here's the code:
$strLogo = $_FILES['logo']['name'];
if(stristr($strLogo, ".jpg") === false || stristr($strLogo, ".jpeg") === false){
die("$strLogo is not a JPEG");
}