close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

File Upload Not Working

Thread began 9/20/2009 10:44 pm by dataworks388155 | Last modified 9/23/2009 11:56 am by Jason Byrnes | 2195 views | 7 replies |

dataworks388155

File Upload Not Working

I can't seem to get File Upload to work from a form that is uploading more than one file.
It works ok on a simple trial page with one upload, but I require to have 1 image and 3 documents uploaded on one form. The script just seems not to do anything. No error messages or anything, but nothing is being uploaded.
Here is the code for the uploads...
<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "Members/PrimaryScools/",
'FileName' => "Logo",
'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' => "Members/PrimarySchools",
'FileName' => "Logo_thumb",
'DefaultFileName' => "",
'ResizeType' => "4",
'ResizeWidth' => "120",
'ResizeHeight' => "120",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_2 End
// WA_UploadResult1 Params End?>
<?php
// WA_UploadResult2 Params Start
$WA_UploadResult2_Params = array();
// WA_UploadResult2_1 Start
$WA_UploadResult2_Params["WA_UploadResult2_1"] = array(
'UploadFolder' => "Members/PrimarySchools",
'FileName' => "MissionVision",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "0",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult2_1 End
// WA_UploadResult2 Params End?>
<?php
// WA_UploadResult3 Params Start
$WA_UploadResult3_Params = array();
// WA_UploadResult3_1 Start
$WA_UploadResult3_Params["WA_UploadResult3_1"] = array(
'UploadFolder' => "Members/PrimarySchools",
'FileName' => "SongPrayer",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "0",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult3_1 End
// WA_UploadResult3 Params End?>
<?php
// WA_UploadResult4 Params Start
$WA_UploadResult4_Params = array();
// WA_UploadResult4_1 Start
$WA_UploadResult4_Params["WA_UploadResult4_1"] = array(
'UploadFolder' => "Members/PrimarySchools",
'FileName' => "RulesRegs",
'DefaultFileName' => "",
'ResizeType' => "0",
'ResizeWidth' => "0",
'ResizeHeight' => "0",
'ResizeFillColor' => "" );
// WA_UploadResult4_1 End
// WA_UploadResult4 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_DFP_SetupUploadStatusStruct("WA_UploadResult2");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFiles("WA_UploadResult2", "MissionVision", "0", "", "false", $WA_UploadResult2_Params);
}
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult3");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFiles("WA_UploadResult3", "SongPrayer", "0", "", "false", $WA_UploadResult3_Params);
}
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult4");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFiles("WA_UploadResult4", " RulesRegs", "0", "", "false", $WA_UploadResult4_Params);
}
?>

Help, please

Sign in to reply to this post

Jason ByrnesWebAssist

Compress the entire php page into a zip file and attach the zip file to your reply so I can look at the code in context.

Sign in to reply to this post

dataworks388155

Hermes

Thanks.


This is the Error displayed on the page

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /hermes/web01c/b1006/hy.dcrawford/reportbookrequest.php on line 589

Entire file is attached

Attached Files
reportbookrequest.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

most likely you have deleted a recordset from the page but the mysql_free_result() for it was left over.


You can probably delete line 589.


i need to see the original PHP page, not the source after running it in the browser. Please compress the PHP page into a zip archive and send it with your reply.

Sign in to reply to this post

dataworks388155

Hermes

Sorry.

Here it is

Attached Files
reportbookrequest.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

The forms action is set to post to formemail.bml. because it is posting to another page, the upload never has a chace to occur.


When a form posts, the information goes directly to the action page, the upload will not occur.

The only way for the upload to occur is if the action of the form is set to post to itself.

Also the Forms Encoding type needs to be set to multipart/form-data

Sign in to reply to this post

dataworks388155

Solved.

Thank you.

Works perfectly now.
Unable to get a progress bar, though. I am seeing the action inserted in the Dreamweaver page, but nothing is visible when the script runs.

Dexter

Sign in to reply to this post

Jason ByrnesWebAssist

Make sure to upload the WA_DigitalFilePro folder to the server after applying the progress bar. If it is still not working, send a copy of the PHP page so I can examine the code.

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