Upload into recordset
If I want to grab the new server name for an image and insert it into a database, should this be bound to a hidden form? If so, would you use create a new Server Variable from bindings, or would you use the bindings in Upload Files > Server File Name?
Also will this work using multiple upload functions on the same page?
Thanks
Code In Page:
<td>*Image 1:</td>
<td><input name="Image1Path" type="file" id="Image1Path" size="60" />
<input name="hiddenField" type="hidden" id="hiddenField" value="<?php echo $WA_DFP_UploadStatus["WA_UploadResult1"]["serverSimpleFileName"]; ?>" /></td>
</tr>
<tr>
<td>Image 2:</td>
<td><input name="Image2Path" type="file" id="Image2Path" size="60" /></td>
</tr>
<tr>
<td>Image 3:</td>
<td><input name="Image3Path" type="file" id="Image3Path" size="60" /></td>
</tr>
Insert Function:
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO tb_nominate_bus (Category, ContactName, Title, Company, Address1, Address2, City, `State`, ZipCode, Country, EmailAddress, Phone, Fax, Installer, Operator, Image1Path, `Description`) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['Category'], "text"),
GetSQLValueString($_POST['ContactName'], "text"),
GetSQLValueString($_POST['Title'], "text"),
GetSQLValueString($_POST['Company'], "text"),
GetSQLValueString($_POST['Address1'], "text"),
GetSQLValueString($_POST['Address2'], "text"),
GetSQLValueString($_POST['City'], "text"),
GetSQLValueString($_POST['State'], "text"),
GetSQLValueString($_POST['ZipCode'], "text"),
GetSQLValueString($_POST['Country'], "text"),
GetSQLValueString($_POST['EmailAddress'], "text"),
GetSQLValueString($_POST['Phone'], "text"),
GetSQLValueString($_POST['Fax'], "text"),
GetSQLValueString($_POST['Installer'], "text"),
GetSQLValueString($_POST['Operator'], "text"),
GetSQLValueString($_POST['hiddenField'], "text"),
GetSQLValueString($_POST['Description'], "text"));