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:
===============