Hi folks,
I am trying to get a form that currently uploads and resizes an image to also insert a record and I have no idea how to make it happen.
here’s the form
<form action="<?php echo $GP_uploadAction; ?>" method="post" enctype="multipart/form-data" name="frm_upload" id="frm_upload" onSubmit="checkFileUpload(this,'',true,5000,'','','','','','');showProgressWindow('fileCopyProgress.htm',300,100);return document.MM_returnValue">
<table width="444" border="0" align="center" cellpadding="10" cellspacing="0">
<tr>
<td width="131" class="bodyblue"><div align="right">Select Photo</div></td>
<td width="273"><input name="fileField" type="file" id="fileField" onChange="checkOneFileUpload(this,'',true,5000,'','','','','','')"></td>
</tr>
<tr>
<td> </td>
<td><div align="right">
<input type="submit" name="button" id="button" value="Upload">
</div></td>
</tr>
<tr>
<td><input name="gallery_no" type="hidden" id="gallery_no" value="6">
<input name="photo" type="hidden" id="photo" value="<?php echo $_FILES['name'];?>"></td>
<td> </td>
</tr>
</table>
</form>
and here is what I need to happen at the same time:
$insertSQL = sprintf("INSERT INTO photos_nwworp (gallery_no, photo) VALUES (%s, %s)",
GetSQLValueString($_POST['gallery_no'], "int"),
GetSQLValueString($_POST['photo'], "text"));
Can anyone point me in the right direction?
cheers
Dave