close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Image Upload - uploads to Server but not showing up in Results

Thread began 3/09/2011 2:06 am by pete | Last modified 3/09/2011 1:57 pm by pete | 806 views | 3 replies

pete

Image Upload - uploads to Server but not showing up in Results

[SuperSuite; CSSFormBuilder 2]
I've created a form that allows a client to populate a Results page. The update/insert functions work fine. However, the image does not show up on the results page.

I'll paste my code here in case it's of use. I'm pretty sure that I'm just missing a dynamic variable of some sort...

Thx,
Pete
===============
BEGIN CODE PASTE:
---------------------------
<?php require_once('Connections/slideshowAdmin.php');?>
<?php require_once('Connections/friends.php'); ?>
<?php require_once("WA_DataAssist/WA_AppBuilder_PHP.php"); ?>
<?php require_once("webassist/file_manipulation/helperphp.php"); ?>
<?php require_once( "WA_SecurityAssist/Helper_PHP.php" ); ?>

<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "images/",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "2",
'ResizeWidth' => "200",
'ResizeHeight' => "120",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFiles("WA_UploadResult1", "logo", "0", "", "true", $WA_UploadResult1_Params);
}
?>
<?php
// WA Application Builder Insert
if (isset($_POST["Insert_x"])) // Trigger
{
$WA_connection = $friends;
$WA_table = "links";
$WA_sessionName = "WADA_Insert_links";
$WA_redirectURL = "links_Results_Admin.php";
if (function_exists("rel2abs")) $WA_redirectURL = $WA_redirectURL?rel2abs($WA_redirectURL,dirname(__FILE__)):"";
$WA_keepQueryString = true;
$WA_indexField = "id";
$WA_fieldNamesStr = "name|url|desc|imagename";
$WA_fieldValuesStr = "".((isset($_POST["name"]))?$_POST["name"]:"") ."" . "|" . "".((isset($_POST["url"]))?$_POST["url"]:"") ."" . "|" . "".((isset($_POST["desc"]))?$_POST["desc"]:"") ."" . "|" . "".((isset($_POST["imagename"]))?$_POST["imagename"]:"") ."";
$WA_columnTypesStr = "',none,''|',none,''|',none,''|',none,''";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_connectionDB = $database_friends;
mysql_select_db($WA_connectionDB, $WA_connection);
if (!session_id()) session_start();
$insertParamsObj = WA_AB_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);
$WA_Sql = "INSERT INTO `" . $WA_table . "` (" . $insertParamsObj->WA_tableValues . ") VALUES (" . $insertParamsObj->WA_dbValues . ")";
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
$_SESSION[$WA_sessionName] = mysql_insert_id();
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);
}
}
?>
<div class="WADAInsertContainer">
<form action="links_Insert.php" method="post" enctype="multipart/form-data" name="WADAInsertForm" id="WADAInsertForm">
<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">
<tr>
<th class="WADADataTableHeader">Company Name:</th>
<td class="WADADataTableCell"><input type="text" name="name" id="name" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Company URL: </th>
<td class="WADADataTableCell"><input type="text" name="url" id="url" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Company Description: </th>
<td class="WADADataTableCell"><input type="text" name="desc" id="desc" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Logo Upload: </th>
<td class="WADADataTableCell"><input name="logo" type="file" size="0
" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Logo Filename: </th>
<td class="WADADataTableCell"><input type="text" name="imagename" id="imagename" value="" size="32" /></td>
</tr>
</table>
<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">
<tr>
<td class="WADADataNavButtonCell" nowrap="nowrap"><input type="image" name="Insert" id="Insert" value="Insert" alt="Insert" src="WA_DataAssist/images/Pacifica/Refined_insert.gif" /></td>
<td class="WADADataNavButtonCell" nowrap="nowrap"><a href="links_Results.php" title="Cancel"><img border="0" name="Cancel" id="Cancel" alt="Cancel" src="WA_DataAssist/images/Pacifica/Refined_cancel.gif" /></a></td>
</tr>
</table>
<input name="WADAInsertRecordID" type="hidden" id="WADAInsertRecordID" value="" />
</div>
</form>
</div>
</body>
</html>
---------------------------
END CODE PASTE:
===============

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

Content

rating

Layout

rating

Ease of use

rating

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