Jump to content

using IF with multiple results?


joecooper

Recommended Posts

[!--quoteo(post=366101:date=Apr 18 2006, 12:58 PM:name=joecooper)--][div class=\'quotetop\']QUOTE(joecooper @ Apr 18 2006, 12:58 PM) [snapback]366101[/snapback][/div][div class=\'quotemain\'][!--quotec--]
if ($_FILES['userfile']['type'] == 'wmv' or 'mpg' or 'mpeg' or 'avi'){

how can i make that work? Thanks
[/quote]

Something like:

if ($_FILES['userfile']['type'] == 'video/x-ms-wmv ' || $_FILES['userfile']['type'] == 'video/mpeg' || $_FILES['userfile']['type'] == 'video/x-msvideo'){

video/mpeg will handle MPG and MPEG.
video/x-msvideo will handle AVI
video/x-ms-wmv will handle WMV (not sure about this one)

I'm not positive on the WMV one, but it may be right. You need to know the mime types associated with the files you are comparing against.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.