simple if/else not working..not sure why.(should be dumb-inly easy)
<p>Ok so i have this image uploading thing im trying to add on this small app im trying to make...i stress <strong><em>trying</em></strong> lol(for my studies), and simply in this section, im trying to check for file type with a simple if/else.</p>

<p>i cut out the code to the part thats giving me problems.</p>

<p>so the html is this:</p>

<pre><code>&lt;form method="post" action="testUpload.php" enctype="multipart/form-data"&gt;
&lt;table summary="practice" width="500"&gt;
        &lt;tr&gt;
            &lt;td&gt;load picture:&lt;/td&gt;
            &lt;td&gt;&lt;input type="file" name="screenshot" id="screenshot" &gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;input type="submit" name="submit" action="submit"&gt;&lt;/td&gt;
        &lt;/tr&gt;
&lt;/table&gt;


&lt;/form&gt;
</code></pre>

<p>the php is this:</p>

<pre><code>$screenshot = $_FILES['screenshot']['name'];
$picSize = $_FILES['screenshot']['size'];
$picType = $_FILES['screenshot']['type'];

if($screenshot &amp;&amp; $picSize &amp;&amp; $picType){
    if($picType == 'image/jpg' || $picType == 'image/pjpeg'){
            echo ' your pic type is jpg &lt;br/&gt;';
    } else {
        echo ' this pic type is not supported &lt;br/&gt;';
    }
}
</code></pre>

<p>when i run this, it always gives me the " this pic type is not supported."</p>

<p>the image im testing with is the correct size, type etc so not sure why its not giving me the first option.</p>

<p>when i test for size like so:</p>

<pre><code>if ($picSize &lt;9000){
        echo ' your pic size is within limits. &lt;br/&gt;';
    } else {
        echo ' pic is too big ';    
    }
</code></pre>

<p>it works so....i don't understand.</p>

<p>any ideas/suggestions etc. ill gladly accept.</p>

<p>thank you.</p>

<p>any ideas</p>
