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.

html code:

```
<div id="main">
    <p id="warn"><font>*</font> max 3 MB each photo</p>
    <p style="font-size:12px">Photo 1<input type="file" style="border:none;" name="image0" id="image0" g='image'></p>
    <p style="font-size:12px">Photo 2<input type="file" style="border:none;" name="image1" id="image1" g='image'></p>
    <p style="font-size:12px">Photo 3<input type="file" style="border:none;" name="image2" id="image2" g='image'></p>
    <p style="font-size:12px">Photo 4<input type="file" style="border:none;" name="image3" id="image3" g='image'></p>
    <p style="font-size:12px">Photo 5<input type="file" style="border:none;" name="image4" id="image4" g='image'></p>
    <p style="font-size:12px">Photo 6<input type="file" style="border:none;" name="image5" id="image5" g='image'></p>
    <p style="font-size:12px">Photo 7<input type="file" style="border:none;" name="image6" id="image6" g='image'></p>
    <p style="font-size:12px">Photo 8<input type="file" style="border:none;" name="image7" id="image7" g='image'></p>
    <p style="font-size:12px">Photo 9<input type="file" style="border:none;" name="image8" id="image8" g='image'></p>
</div>

```

php 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 && !empty($image0))   {
    $insert = mysql_query("UPDATE ".$tabla." SET pic1='".$image0."' WHERE id='$lastid'  " ) or die (mysql_error());     
}
if ($image_size1==TRUE && !empty($image1))  {
    $insert = mysql_query("UPDATE ".$tabla." SET pic2='".$image1."' WHERE id='$lastid'  " ) or die (mysql_error());     
}
if ($image_size2==TRUE && !empty($image2))  {
    $insert = mysql_query("UPDATE ".$tabla." SET pic3='".$image2."' WHERE id='$lastid'  " ) or die (mysql_error());
}
if ($image_size3==TRUE && !empty($image3))  {
    $insert = mysql_query("UPDATE ".$tabla." SET pic4='".$image3."' WHERE id='$lastid' " ) or die (mysql_error());
}
if ($image_size4==TRUE && !empty($image4))  {
    $insert = mysql_query("UPDATE ".$tabla." SET pic5='".$image4."' WHERE id='$lastid'  " ) or die (mysql_error()); 
}
if ($image_size5==TRUE && !empty($image5))  {
    $insert = mysql_query("UPDATE ".$tabla." SET pic6='".$image5."' WHERE id='$lastid'  " ) or die (mysql_error()); 
}
if ($image_size6==TRUE && !empty($image6))  {
    $insert = mysql_query("UPDATE ".$tabla." SET pic7='".$image6."' WHERE id='$lastid'  " ) or die (mysql_error());     
}
if ($image_size7==TRUE && !empty($image7))  {
    $insert = mysql_query("UPDATE ".$tabla." SET pic8='".$image7."' WHERE id='$lastid'  " ) or die (mysql_error()); 
}
if ($image_size8==TRUE && !empty($image8))  {
    $insert = mysql_query("UPDATE ".$tabla." SET pic9='".$image8."' WHERE id='$lastid'  " ) or die (mysql_error());     
}

```