Forum Moderators: coopster
Example :
//****************
$type="image/jpeg";
if ($type!="image/jpeg" ¦¦ $type!="image/pjpeg") {echo "error";}
//*****************
This example will always return an error despite the filename is correct. What would be the statement so that it returns an error ONLY if both doesn't match.
The alternative I have is this one...
// **************
if ($type=="image/jpeg" ¦¦ $type=="image/pjpeg") {} else {
$preview="error";}
//***************
... but this is not what I need (because I have a long list of elseif statements)
Hope I was clear... Any help?
Thanks
$type="image/jpeg";
if ($type!="image/jpeg" && $type!="image/pjpeg") {echo "error";}
¦¦= 'OR'; (note: pipes need to be repaired to non-broken pipes);
&&= 'AND';
[be2.php.net...]
happy coding!