Ok, here's my code. Can't get it to check file extension properly or file
size...had it working before but not sure why it's buggy now.
} elseif ($photo) {
$ext = strtolower(subs tr($photo, -3));
if ($ext == "peg") { $ext = "jpg"; }
if ($ext != "gif" || $ext != "jpg" || $ext != "jpeg" || $ext !="bmp" )
{
$focus = "photo";
$msg = "Please provide a valid gif, jpeg, or bmp photo";
} else {
$photo_size = getimagesize($p hoto);
if ($photo_size > 25000) {
$msg = "Photo must be smaller than 25k.";
}}} elseif { etc, etc. } else { dbqueries...
size...had it working before but not sure why it's buggy now.
} elseif ($photo) {
$ext = strtolower(subs tr($photo, -3));
if ($ext == "peg") { $ext = "jpg"; }
if ($ext != "gif" || $ext != "jpg" || $ext != "jpeg" || $ext !="bmp" )
{
$focus = "photo";
$msg = "Please provide a valid gif, jpeg, or bmp photo";
} else {
$photo_size = getimagesize($p hoto);
if ($photo_size > 25000) {
$msg = "Photo must be smaller than 25k.";
}}} elseif { etc, etc. } else { dbqueries...
Comment