Hey guys, can you have a look through this code and make some suggestions? Any would be appreciated, thanks.
<?php
session_start();
if ($photo1 != "none" or $photo2 != "none" or $photo3 != "none" or $photo4 != "none" or $photo5 != "none" or $photo6 != "none")
{
$i=0;
$numphotos=0;
$imageno=1;
$array=array();
while ($i<6)
{
$i++;
$photo=photo;
$photo.=$i;
if ( is_uploaded_file ( $HTTP_POST_FILES[$photo]['tmp_name']) ) {
$imagetype=$HTTP_POST_FILES[$photo]['type'];
if($imagetype=='image/pjpeg' || $imagetype=='image/gif') {}
else { $error="One or more of your image types were unsupported"; }
$array[$imageno] = $$photo;
$imageno++;
$numphotos++;
}
}
}
else {$empty="Y";}
?>
The above is my image check script, just some comments and maybe ways in which I can get round common problems. Basically just some tips 😃 . Thanks!