title: validation for file upload in php
body: <p>Hi i am trying to restrict the file uploading if the file size exceeds the particular size 
    but my problem is if the file size exceeds the maximum size i didn't get any information 
    about the file in the php server my code in the HTML is as follows please help me why i 
    didn't get the information.</p>
  
  <pre><code>&lt;?php echo $form-&gt;create('Add', array('id'=&gt;'addFile', 'enctype'=&gt;'multipart/form-data', 'url'=&gt;'/content/upload?path='.$contentItem['url_path']),array(         
      'inputDefaults' =&gt; array('label' =&gt; false))); ?&gt;    
  &lt;div class="_100 formText"&gt;
      &lt;label&gt;Section&amp;nbsp;: &lt;/label&gt;
       &lt;input type="input" value="&lt;?php echo (!empty($contentItem['display_text'])) ? $contentItem['display_text'] : $contentItem['parent_disp_txt'] ;?&gt;" name="data[Add][section]" readonly="readonly"/&gt;
  &lt;/div&gt;
  &lt;div class="clear" style="height: 5px;"&gt;&lt;/div&gt;
  &lt;div class="_100 formText"&gt;
      &lt;label&gt;File Name&amp;nbsp;: &lt;/label&gt;
       &lt;input type="input" value="" name="data[Add][file]" class="filePath"/&gt;
  &lt;/div&gt;
  &lt;div class="clear" style="height: 5px;"&gt;&lt;/div&gt;
  &lt;div class="_99 formText"&gt;
      &lt;label&gt;File Description&amp;nbsp;: &lt;/label&gt;
      &lt;textarea rows="3" cols="" name="data[Add][description]" class="description" style="resize:none;"&gt;&lt;/textarea&gt;
  &lt;/div&gt;
  &lt;div class="clear" style="height: 15px;"&gt;&lt;/div&gt;
  &lt;div class="_99 formText"&gt;
      &lt;label&gt;Select File to Upload: &lt;/label&gt;
      &lt;input type="file" name="data[Add][upload]" class="filesToUpload" id="file"/&gt;
  &lt;/div&gt;
  &lt;?php echo $html-&gt;tags['formend'];?&gt;    
  </code></pre>