How to prevent php from uploading files:
<p>How do you prevent php from uploading files into ./tmp/ folder if they are not the correct type.</p>

<p>For example the sample code given on the w3school website checks the file length using the following code:</p>

<pre><code>if ((($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/jpeg")
|| ($_FILES["file"]["type"] == "image/pjpeg"))
</code></pre>

<p>But this is after the files have already been uploaded to temp, am I correct?
Is there any way to do this in php or will I have to do it on the client side?</p>
