close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Dynamic Upload Folder Difficulties

Thread began 4/15/2012 8:07 am by karey307024 | Last modified 4/23/2012 8:09 am by Jason Byrnes | 1382 views | 3 replies |

karey307024

Dynamic Upload Folder Difficulties

Hi there,

I've searched the boards but cannot resolve my issue, though it is similar to others who have posted.

I'm trying to do a combination of static plus dynamic for the folder I'm uploading photos to. The problem is that the dynamic portion is not working, and the images are uploading to the static portion only (which is created with no problem by the uploader.

Any help would be greatly appreciated. The code is currently as follows:

$var3_rsChallenge = "-1";
if (isset($_GET['contest'])) {
$var3_rsChallenge = $_GET['contest'];
}
mysql_select_db($database_myisateam, $myisateam);
$query_rsChallenge = sprintf("SELECT * FROM challenges WHERE challenge_id=%s", GetSQLValueString($var3_rsChallenge, "int"));
$rsChallenge = mysql_query($query_rsChallenge, $myisateam) or die(mysql_error());
$row_rsChallenge = mysql_fetch_assoc($rsChallenge);
$totalRows_rsChallenge = mysql_num_rows($rsChallenge);?>

<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "pics/".$row_rsChallenge['pictures_folder'] ."",
'FileName' => "[FileName]",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "120",
'ResizeHeight' => "120",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End
// WA_UploadResult1_2 Start
$WA_UploadResult1_Params["WA_UploadResult1_2"] = array(
'UploadFolder' => "pics/".$row_rsChallenge['pictures_folder'] ."",
'FileName' => "[FileName]_thumb",
'DefaultFileName' => "",
'ResizeType' => "1",
'ResizeWidth' => "60",
'ResizeHeight' => "60",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_2 End
// WA_UploadResult1 Params End

Sign in to reply to this post

Jason ByrnesWebAssist

if it is not using a value from the recordset for the folder name it suggests that the recordset is empty.


you don't provide the full page, so it is difficult to say for certain, but my guess is that the contest querystring variable is being passed into the page when it initially loads, but is not passed by the forms action when the form is submitted

use the following code for the action of the form so that any querystring variables passed in initialy will also be included in the form post:

php:
 action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".htmlspecialchars($_SERVER["QUERY_STRING"]):""?>
Sign in to reply to this post

kennyaddisonn438382

It could not access the values from the resultant recordset.yet it shows ambiguous error of null values.


used car site

Sign in to reply to this post

Jason ByrnesWebAssist

how is the recordset configured?

if the recordset is returning a null value, it suggests that the variable being used to filter is not correct.

Sign in to reply to this post

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