Use a different measurement of data rather than KB
<p>I'm currently tinkering around with some code which allows me to upload files to my site. I am going to set an option in a configuration file which allows users to set the maximum upload limit. At the moment this has to be entered in kilobytes and I was wondering whether or not it'd be possible to have it entered in MB?</p>

<pre><code>if ((($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/jpeg")
|| ($_FILES["file"]["type"] == "image/png")
|| ($_FILES["file"]["type"] == "image/pjpeg"))
**&amp;&amp; ($_FILES["file"]["size"] &lt; 2000000)** &lt;---- Entered in Kilobytes, not MB.
&amp;&amp; in_array($extension, $allowedExts))
</code></pre>
