Hey guys I was wondering if there was a way to have more than one condition in an IF statement.
Thanks

Ok I found it... You have to use the AND operator "&&"... my bad.

Don't forget that you can also use the OR operator "||" for situations where you only care if one condition is true/false.

if ((fileExt == ".mp4")|| (fileExt ==".mpg") ||(fileExt ==".avi"))
{

}
else
{

}

maulikmaruti.

Please do not resurrect threads that are years old. By doing so you run the risk of confusing current posters. Have a look at forum rules.
Please read before posting - http://www.daniweb.com/forums/thread78223.html

Thread Closed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.