close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Upload into recordset

Thread began 10/20/2010 7:50 pm by ddileo415479 | Last modified 10/21/2010 10:06 am by Jason Byrnes | 468 views | 1 replies |


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?


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>
<td>Image 2:</td>
<td><input name="Image2Path" type="file" id="Image2Path" size="60" /></td>
<td>Image 3:</td>
<td><input name="Image3Path" type="file" id="Image3Path" size="60" /></td>

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"));

Sign in to reply to this post

Jason ByrnesWebAssist

Due to limitations of the Dreamweaver Insert Record Server Behavior, the uplaoded file name can not be retuned at insert time.

to accomplish this, you will need to use the DataAssist insert record server behavior instead:

The problem is that the Dreamweavver insert record behavior will only allow you to get information from form elements.

The server file name is not created until the file is uploaded to the server. The server file name is only available at run time and cannot be assigned to form since it is created after the form submits.

The DataAssist insert record behavior will allow yo to get information from any server variable listed in the bindings panel, including the Upload Files -> Server File Name

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...