Jump to content

[SOLVED] Upload Multiple Files with Single Form


xProteuSx

Recommended Posts

I have designed a database around the idea that I could upload multiple image files with a single form.  Now, it seems, I can't figure out how to do this and all my hard work appear to be down the toilet atm.

 

    <tr valign="top">
    	<td bgcolor="#dedede" width="120" align="left"><font size="-1"> Image of Front: </font></td>
        <td bgcolor="#dedede" align="left">
        	<center><input type="file" name="notes_image_front" size="27"><br><font size="-2">Max filesize: 150kb.  Width must be: 600px.  Maximum height: 1500px.</center>
        </td>
    </tr>
    <tr valign="top">
    	<td bgcolor="#dedede" width="120" align="left"><font size="-1"> Image of Back: </font></td>
        <td bgcolor="#dedede" align="left">
        	<center><input type="file" name="notes_image_back" size="27"><br><font size="-2">Max filesize: 150kb.  Width must be: 600px.  Maximum height: 1500px.</center>
        </td>
    </tr>
    <tr valign="top">
    	<td bgcolor="#dedede" width="120" align="left"><font size="-1"> Thumbnail: </font></td>
        <td bgcolor="#dedede" align="left">
        	<center><input type="file" name="notes_image_thumb" size="27"><br><font size="-2">Max filesize: 50kb.  Width must be: 200px.  Maximum height: 500px.</center>
        </td>
    </tr>

 

This is the form.  The php for getting the three values is:

 

$notes_image_front = mysql_real_escape_string($_POST['notes_image_front']);
$notes_image_back = mysql_real_escape_string($_POST['notes_image_back']);
$notes_image_thumb = mysql_real_escape_string($_POST['notes_image_thumb']);

 

Ofcourse, when I go to submit the form, the three values come back as NULL.

 

I have googled the crap out of 'how to upload multiple files with a single form in php' and have come up with nothing that I have been able to implement.

 

Help please!!  You guys have always come through for me before!  Thanks in advance.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.