Using With Dreamweaver 8 Insert Record Server Behavior
Can someone assist me with how I can implement the DFP with using Dreamweaver 8's Insert Record Server Behavior.
My problem:
Image will not upload to the folder, but the record will insert in the db table
Image filename is not recorded in db field
CODE:
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["undefined"])){
WA_DFP_UploadFile("WA_UploadResult1", "image", "", "../../images/team/", "[FileName]", "2", "[FileName]_[Increment]", "0", "true", "59", "60");
}
?>
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO gymnast_links (company, link, image) VALUES (%s, %s, %s)",
GetSQLValueString($_POST['company'], "text"),
GetSQLValueString($_POST['link'], "text"),
GetSQLValueString($_POST['image'], "text"));
FORM:
<tr valign="baseline">
<td nowrap align="right">Image:</td>
<td><input name="image" type="file" id="image" />
(your image height should be no more than 60px) </td>
</tr>
<input type="hidden" name="MM_insert" value="form1">
<input name="image" type="hidden" id="image" />
Thank you!