hi guys i want upload four image in my databese and i dnt know how to go abt it : have been using php for some time now and i can only upload just one image to my database and with directory path..
bt now m trying to upload many files in a form bt its just saving one file out of four images i try to upload.. ur helps will be much apprecited...

<!-- begin snippet: js hide: false -->

<!-- language: lang-js -->

    $mypic = $_FILES['upload']['name'];
    $temp = $_FILES['upload']['tmp_name'];
    $type = $_FILES['upload']['type'];
    $id = $_POST['name'];

    if(($type=="image/jpeg")||($type=="image/jpg")||($type=="image/bmp"))
    {
    $directory = "profiles/$id/images";
    mkdir($directory, 0777,true);

    move_uploaded_file($temp,"{$directory}/$mypic");

<!-- language: lang-html -->

    <form name="upload.php" enctype="multipart/form-data" method="post">
     <input type='file' name='upload'><br/>
     <input type='file' name='upload'><br/>
     <input type='file' name='upload'><br/>
     <input type='file' name='upload'><br/>
     <input type='submit' name='submit'/><br/>
     </form>

<!-- end snippet -->

