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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Upload Not working

Thread began 2/13/2012 3:33 pm by BeDigital94844 | Last modified 2/14/2012 2:02 pm by BeDigital94844 | 598 views | 3 replies

BeDigital94844Beta Tester

Upload Not working

Hi-

I have used DA 2.08 and have had this working in the past -
but now with DA 2.10 I seem to have an issue- the insert to database is working perfectly but the file is not getting to the directory on the server-
I checked permissions 775
muli-part form OK
is there a setting on the server- I missed?
safe mode off

It ALL works perfectly at the root of the file system- but if I create it, or move it to a sub-directory e.g. /CMS/
it will fail - I checked the relative paths settings; site vs document - it is set to "document"

any help would be very much appreciated-

----code as follows-----

<?php require_once('Connections/espn_techcenter.php'); ?>
<?php require_once("WA_DataAssist/WA_AppBuilder_PHP.php"); ?>
<?php require_once("webassist/file_manipulation/helperphp.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' => "0",
'ResizeWidth' => "120",
'ResizeHeight' => "120",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["Insert_x"])){
WA_DFP_UploadFiles("WA_UploadResult1", "logo_sponsor", "0", "", "true", $WA_UploadResult1_Params);
}
?>
<?php
// WA Application Builder Insert
if (isset($_POST["Insert_x"])) // Trigger
{
$WA_connection = $espn_techcenter;
$WA_table = "sponsors";
$WA_sessionName = "WADA_Insert_sponsors";
$WA_redirectURL = "Detail.php";
if (function_exists("rel2abs")) $WA_redirectURL = $WA_redirectURL?rel2abs($WA_redirectURL,dirname(__FILE__)):"";
$WA_keepQueryString = false;
$WA_indexField = "id_sponsor";
$WA_fieldNamesStr = "name_sponsor|logo_sponsor|date_sponsor";
$WA_fieldValuesStr = "".((isset($_POST["name_sponsor"]))?$_POST["name_sponsor"]:"") ."" . "|" . "".$WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"] ."" . "|" . "".((isset($_POST["date_sponsor"]))?$_POST["date_sponsor"]:"") ."";
$WA_columnTypesStr = "',none,''|',none,''|',none,NULL";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_connectionDB = $database_espn_techcenter;
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);
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert sponsors</title>
<link href="WA_DataAssist/styles/Traditional_Moab.css" rel="stylesheet" type="text/css" />
<link href="WA_DataAssist/styles/Arial.css" rel="stylesheet" type="text/css" />
</head>

<body>

<div class="WADAInsertContainer">
<form action="Insert.php" method="post" enctype="multipart/form-data" name="WADAInsertForm" id="WADAInsertForm">
<div class="WADAHeader">Insert 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">
<tr>
<th class="WADADataTableHeader">Sponsor ID:</th>
<td class="WADADataTableCell"></td>
</tr>
<tr>
<th class="WADADataTableHeader">Sponsor Name:</th>
<td class="WADADataTableCell"><input type="text" name="name_sponsor" id="name_sponsor" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Sponsor Logo:</th>
<td class="WADADataTableCell"><label>
<input type="file" name="logo_sponsor" id="logo_sponsor" />
</label></td>
</tr>
<tr>
<th class="WADADataTableHeader">Date:</th>
<td class="WADADataTableCell"><input type="hidden" name="date_sponsor" id="date_sponsor" value="" /></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/Moab/Traditional_insert.gif" /></td>
<td class="WADADataNavButtonCell" nowrap="nowrap"><a href="sponsors_Results.php" title="Cancel"><img border="0" name="Cancel" id="Cancel" alt="Cancel" src="WA_DataAssist/images/Moab/Traditional_cancel.gif" /></a></td>
</tr>
</table>
<input name="WADAInsertRecordID" type="hidden" id="WADAInsertRecordID" value="" />
</div>
</form>
</div>
</body>
</html>

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