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

Problem with DFP and Data Assist Update page

Thread began 3/23/2010 9:15 am by mattoconnell298972 | Last modified 3/24/2010 8:09 pm by mattoconnell298972 | 801 views | 3 replies


Problem with DFP and Data Assist Update page


Back again...after the insert page I am now having a few hassles with the update page.
A few people have had the same that I can see, I am sure my problem is simple as well.

I cannon get my update page to either upload the file or change the filename in the thumb image field in the db.

Here is a sample of my relevant code. (Upload and update)
I have tried the debug, but nothing comes up.

Any ideas guys?? Thanks!

// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "../images/user/thumbs/",
'FileName' => "[FileName]",
'DefaultFileName' => "".((isset($_POST["thumbImg"]))?$_POST["thumbImg"]:"") ."",
'ResizeType' => "1",
'ResizeWidth' => "85",
'ResizeHeight' => "85",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
WA_DFP_UploadFiles("WA_UploadResult1", "thumbUpdate", "0", "", "JPG:80", $WA_UploadResult1_Params);
// WA Application Builder Update
if ($_SERVER["REQUEST_METHOD"] == "POST") // Trigger
$WA_connection = $connPriefert;
$WA_table = "content";
$WA_redirectURL = "newsDetail.php?contentID=".((isset($_POST["WADAUpdateRecordID"]))?$_POST["WADAUpdateRecordID"]:"") ."";
$WA_keepQueryString = false;
$WA_indexField = "contentID";
$WA_fieldNamesStr = "contentTitle|thumbImg|contentHome|contentLong|contentShort|date";
$WA_fieldValuesStr = "".((isset($_POST["contentTitle"]))?$_POST["contentTitle"]:"") ."" . "|" . "".$WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"] ."" . "|" . "".((isset($_POST["contentHome"]))?$_POST["contentHome"]:"") ."" . "|" . "".((isset($_POST["contentLong"]))?$_POST["contentLong"]:"") ."" . "|" . "".((isset($_POST["contentShort"]))?$_POST["contentShort"]:"") ."" . "|" . "".((isset($_POST["date"]))?$_POST["date"]:"") ."";
$WA_columnTypesStr = "',none,''|',none,''|',none,''|',none,''|',none,''|',none,''";
$WA_comparisonStr = "=|=|=|=|=|=";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);

$WA_where_fieldValuesStr = "".((isset($_POST["WADAUpdateRecordID"]))?$_POST["WADAUpdateRecordID"]:"") ."";
$WA_where_columnTypesStr = "none,none,NULL";
$WA_where_comparisonStr = "=";
$WA_where_fieldNames = explode("|", $WA_indexField);
$WA_where_fieldValues = explode("|", $WA_where_fieldValuesStr);
$WA_where_columns = explode("|", $WA_where_columnTypesStr);
$WA_where_comparisons = explode("|", $WA_where_comparisonStr);

$WA_connectionDB = $database_connPriefert;
mysql_select_db($WA_connectionDB, $WA_connection);
if (!session_id()) session_start();
$updateParamsObj = WA_AB_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);
$WhereObj = WA_AB_generateWhereClause($WA_where_fieldNames, $WA_where_columns, $WA_where_fieldValues, $WA_where_comparisons );
$WA_Sql = "UPDATE `" . $WA_table . "` SET " . $updateParamsObj->WA_setValues . " WHERE " . $WhereObj->sqlWhereClause . "";
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
if ($WA_redirectURL != "") {
if ($WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
$WA_redirectURL .= ((strpos($WA_redirectURL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
header("Location: ".$WA_redirectURL);

And now for the update form:

<form action="newsUpdate.php?contentID=<?php echo(rawurlencode($row_WADAcontent['contentID'])); ?>" method="post" name="WADAUpdateForm" id="WADAUpdateForm">
<div class="WADAHeader">Update Record</div>
<div class="WADAHorizLine"><img src="../WA_DataAssist/images/_tx_.gif" alt="" height="1" width="1" border="0" /></div>
<table class="WADADataTable" cellpadding="0" cellspacing="0" border="0">
<th class="WADADataTableHeader">Date:</th>
<td class="WADADataTableCell"><input type="text" name="date" id="date" value="<?php echo(str_replace('"', '&quot;', $row_WADAcontent['date'])); ?>" size="32" /></td>
<th class="WADADataTableHeader">Title:</th>
<td class="WADADataTableCell"><input type="text" name="contentTitle" id="contentTitle" value="<?php echo(str_replace('"', '&quot;', $row_WADAcontent['contentTitle'])); ?>" size="32" /></td>
<th class="WADADataTableHeader">Thumb Image:</th>
<td class="WADADataTableCell"><input type="hidden" name="thumbImg" id="thumbImg" value="<?php echo(str_replace('"', '&quot;', $row_WADAcontent['thumbImg'])); ?>"/><input type="file" name="thumbUpdate" />

<td>&nbsp;</td><td><img src="../images/user/thumbs/<?php echo $row_WADAcontent['thumbImg']; ?>" alt="News Thumb" width="85" height="85" hspace="10" /></td>
<th class="WADADataTableHeader">Home Page<br />Content:</th>
<td class="WADADataTableCell"><textarea id="contentHome" name="contentHome" rows="3" cols="60" style="width: 100%"><?php echo $row_WADAcontent['contentHome']; ?>
<th class="WADADataTableHeader">News List<br />Page Content</th>
<td class="WADADataTableCell"><textarea id="contentShort" name="contentShort" rows="6" cols="60" style="width: 100%"><?php echo(str_replace('"', '&quot;', $row_WADAcontent['contentShort'])); ?>
<th class="WADADataTableHeader">News Detail<br />
<td class="WADADataTableCell"><?php
// WebAssist iRite: Rich Text Editor for Dreamweaver
$WARichTextEditor_1 = CreateRichTextEditor ("contentLong", "../../HTMLEditor/", "600px", "400px", "Default", "../custom/news_Update_contentLong3.js", "".($totalRows_WADAcontent > 0)?$row_WADAcontent['contentLong']:($row_WADAContent['contentLong']) ."");
<div class="WADAHorizLine"><img src="../WA_DataAssist/images/_tx_.gif" alt="" height="1" width="1" border="0" /></div>
<div class="WADAButtonRow">
<table class="WADADataNavButtons" border="0" cellpadding="0" cellspacing="0">
<td class="WADADataNavButtonCell" nowrap="nowrap"><input type="image" name="Update" id="Update" value="Update" alt="Update" src="../WA_DataAssist/images/Pacifica/Refined_update.gif" /></td>
<td class="WADADataNavButtonCell" nowrap="nowrap"><a href="news_Results.php" title="Cancel"><img border="0" name="Cancel" id="Cancel" alt="Cancel" src="../WA_DataAssist/images/Pacifica/Refined_cancel.gif" /></a></td>
<input name="WADAUpdateRecordID" type="hidden" id="WADAUpdateRecordID" value="<?php echo(rawurlencode($row_WADAcontent['contentID'])); ?>" />

Any ideas guys?

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...