title: PHP, Mysql inserting pictures into row
body: <p>I am kinda new to configuring a apache/mysql server , but I have a problem . I have searched and searched all over the internet and I can't find anything that solves my problem.
  I have a site which uploads a form into my mysql database , my uploading php code works fine , because I have tested it, the thing is that in this form people can upload a maximum of 9 photos , everything works fine when you upload photos under 1 MB each , the thing is that every time someone uploads photos that added up exceeds 8 MB the form doesn't get uploaded . 
  It's fine to upload , let's say 3 photos of 2 MB each , they will be uploaded , as long as the photos uploaded added up don't exceed 8 MB , now my question is : how can I increase the maximum memory of a row in my db to accept files that added up are larger than 8 MB , please help , thank you.</p>
  
  <p>html code:</p>
  
  <pre><code>&lt;div id="main"&gt;
      &lt;p id="warn"&gt;&lt;font&gt;*&lt;/font&gt; max 3 MB each photo&lt;/p&gt;
      &lt;p style="font-size:12px"&gt;Photo 1&lt;input type="file" style="border:none;" name="image0" id="image0" g='image'&gt;&lt;/p&gt;
      &lt;p style="font-size:12px"&gt;Photo 2&lt;input type="file" style="border:none;" name="image1" id="image1" g='image'&gt;&lt;/p&gt;
      &lt;p style="font-size:12px"&gt;Photo 3&lt;input type="file" style="border:none;" name="image2" id="image2" g='image'&gt;&lt;/p&gt;
      &lt;p style="font-size:12px"&gt;Photo 4&lt;input type="file" style="border:none;" name="image3" id="image3" g='image'&gt;&lt;/p&gt;
      &lt;p style="font-size:12px"&gt;Photo 5&lt;input type="file" style="border:none;" name="image4" id="image4" g='image'&gt;&lt;/p&gt;
      &lt;p style="font-size:12px"&gt;Photo 6&lt;input type="file" style="border:none;" name="image5" id="image5" g='image'&gt;&lt;/p&gt;
      &lt;p style="font-size:12px"&gt;Photo 7&lt;input type="file" style="border:none;" name="image6" id="image6" g='image'&gt;&lt;/p&gt;
      &lt;p style="font-size:12px"&gt;Photo 8&lt;input type="file" style="border:none;" name="image7" id="image7" g='image'&gt;&lt;/p&gt;
      &lt;p style="font-size:12px"&gt;Photo 9&lt;input type="file" style="border:none;" name="image8" id="image8" g='image'&gt;&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>php code :</p>
  
  <pre><code>$image0 = addslashes(file_get_contents($_FILES['image0']['tmp_name']));
  $image1 = addslashes(file_get_contents($_FILES['image1']['tmp_name']));
  $image2 = addslashes(file_get_contents($_FILES['image2']['tmp_name']));
  $image3 = addslashes(file_get_contents($_FILES['image3']['tmp_name']));
  $image4 = addslashes(file_get_contents($_FILES['image4']['tmp_name']));
  $image5 = addslashes(file_get_contents($_FILES['image5']['tmp_name']));
  $image6 = addslashes(file_get_contents($_FILES['image6']['tmp_name']));
  $image7 = addslashes(file_get_contents($_FILES['image7']['tmp_name']));
  $image8 = addslashes(file_get_contents($_FILES['image8']['tmp_name']));
  $image_size = getimagesize ($_FILES['image0']['tmp_name']);
  $image_size1 = getimagesize ($_FILES['image1']['tmp_name']);
  $image_size2 = getimagesize ($_FILES['image2']['tmp_name']);
  $image_size3 = getimagesize ($_FILES['image3']['tmp_name']);
  $image_size4 = getimagesize ($_FILES['image4']['tmp_name']);
  $image_size5 = getimagesize ($_FILES['image5']['tmp_name']);
  $image_size6 = getimagesize ($_FILES['image6']['tmp_name']);
  $image_size7 = getimagesize ($_FILES['image7']['tmp_name']);
  $image_size8 = getimagesize ($_FILES['image8']['tmp_name']);
  
  
  if ($image_size==TRUE &amp;&amp; !empty($image0))   {
      $insert = mysql_query("UPDATE ".$tabla." SET pic1='".$image0."' WHERE id='$lastid'  " ) or die (mysql_error());     
  }
  if ($image_size1==TRUE &amp;&amp; !empty($image1))  {
      $insert = mysql_query("UPDATE ".$tabla." SET pic2='".$image1."' WHERE id='$lastid'  " ) or die (mysql_error());     
  }
  if ($image_size2==TRUE &amp;&amp; !empty($image2))  {
      $insert = mysql_query("UPDATE ".$tabla." SET pic3='".$image2."' WHERE id='$lastid'  " ) or die (mysql_error());
  }
  if ($image_size3==TRUE &amp;&amp; !empty($image3))  {
      $insert = mysql_query("UPDATE ".$tabla." SET pic4='".$image3."' WHERE id='$lastid' " ) or die (mysql_error());
  }
  if ($image_size4==TRUE &amp;&amp; !empty($image4))  {
      $insert = mysql_query("UPDATE ".$tabla." SET pic5='".$image4."' WHERE id='$lastid'  " ) or die (mysql_error()); 
  }
  if ($image_size5==TRUE &amp;&amp; !empty($image5))  {
      $insert = mysql_query("UPDATE ".$tabla." SET pic6='".$image5."' WHERE id='$lastid'  " ) or die (mysql_error()); 
  }
  if ($image_size6==TRUE &amp;&amp; !empty($image6))  {
      $insert = mysql_query("UPDATE ".$tabla." SET pic7='".$image6."' WHERE id='$lastid'  " ) or die (mysql_error());     
  }
  if ($image_size7==TRUE &amp;&amp; !empty($image7))  {
      $insert = mysql_query("UPDATE ".$tabla." SET pic8='".$image7."' WHERE id='$lastid'  " ) or die (mysql_error()); 
  }
  if ($image_size8==TRUE &amp;&amp; !empty($image8))  {
      $insert = mysql_query("UPDATE ".$tabla." SET pic9='".$image8."' WHERE id='$lastid'  " ) or die (mysql_error());     
  }
  </code></pre>