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

rating

Cant get the file to upload

Thread began 10/14/2009 6:03 pm by neileisen207079 | Last modified 10/15/2009 3:46 pm by Jason Byrnes | 1343 views | 6 replies |

neileisen207079

Cant get the file to upload

I have tried everything and I cant get it to work.
I have a form, this is the code:

<form action="" method="post" enctype="multipart/form-data" name="specialorder" id="specialorder">
<input name="productname" type="hidden" id="productname" value="<?php echo $row_rsProducts['ProductName']; ?>" />
<label></label>
<label>
<span class="prodname">Price Quote for <?php echo $row_rsProducts['ProductName']; ?></span><br />
<br />
<br />
First Name<br />
<input type="text" name="first" id="first" tabindex="1" />
<br />
<br />
Last Name
<br />
<input type="text" name="last" id="last" tabindex="2" />
<br />
<br />
<br />
E-Mail Address<br />
<input type="text" name="email" id="email" tabindex="3" />
<br />
<br />
Phone<br />
<input type="text" name="phone" id="phone" tabindex="4" />
<br />
</label>
<p>
<label>
Quantity<br />
<input type="text" name="quantity" id="quantity" tabindex="5" />
<br />
</label>
</p>
<p>
<label>Artwork Upload <br />
<input type="file" name="artwork" id="artwork" tabindex="6" />
</label>
<br />
<label></label>
</p>
<p>
<label>
Options / Instructions
<br />
<textarea name="instructions" id="instructions" cols="30" rows="5" tabindex="7"></textarea>
<br />
</label>
</p>
<p>
<label>
<input type="submit" name="button" id="button" value="Submit for Price Quote" />
</label>
</p>
<p>status:<?php echo $WA_DFP_UploadStatus["WA_UploadResult1"]["statusCode"]; ?></p>
<p>Error Message:<?php echo $WA_DFP_UploadStatus["WA_UploadResult1"]["errorMessage"]; ?></p>
<p>Client File Name:<?php echo $WA_DFP_UploadStatus["WA_UploadResult1"]["clientFileName"]; ?></p>
<p>Upload Folder:<?php echo $WA_DFP_UploadStatus["WA_UploadResult1"]["uploadFolder"]; ?></p>
<p>Debug Info:<?php echo WA_DFP_UploadStatusItem_debug("WA_UploadResult1"); ?></p>
</form>


Here is the code for the upload:

<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["button"])){
WA_DFP_UploadFile("WA_UploadResult1", "artwork", "", "client_art", "[FileName]", "0", "[FileName]_[Increment]", "1000", "false", "0", "0");
}
?>


And this is the result on the page... I am redirecting to the same page... using Universal e-mail to send a copy of the uploaded file as an attachment.

The email goes through, but with no attachment, and the file is not being uploaded to the folder called client_art. Here is the error code on the resulting page:

THis at the very top of the page:

Notice: Undefined index: artwork in /var/www/html/WA_DigitalFilePro/HelperPHP.php on line 47

This in the debugging code section:

status:0

Error Message:No file uploaded

Client File Name:

Upload Folder:
Notice: Undefined index: uploadFolder in /var/www/html/details.php on line 1510

Debug Info:Status object: WA_UploadResult1
statusCode : 0
errorMessage : No file uploaded
clientFileName :
fileExtension :
serverFileName :
serverDirectory :
contentType :
fileWasOverwritten :
fileWasSkipped :
fileWasRenamed :
fileSize : -1
isImage :
imageWidth : -1
imageHeight : -1



HERE is line 47 of the Helper.php file:

$uploadedFile = $_FILES[$fileField];


At this for HOURS. Can you please help?
Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

please send a copy of the PHP page so I can see the code in context.

Compress the PHP page into a zip archive and attach the zip file to your replay.

Sign in to reply to this post

neileisen207079

Here is the file

Attached is the zip file of the page.
thank you.

Attached Files
details.zip
Sign in to reply to this post

Jason ByrnesWebAssist

It looks to me like the upload form is badly nested inside of another form, hard to tell without running the code, but it would explain the error you are getting.

before submitting the form, view source an the page and make sure that the upload form is not nested inside of another form.

Sign in to reply to this post

neileisen207079

Thanks - still one last thing

Jason, it appears you were right. I am trying to keep this page as organized as possible, but its really a bear. I worked with several of your colleagues on this site over the past year after a programmer that was referred by Webassist gave up on it after working on it ( or not working on it) for 5 months. I was forced to take over and try to figure out a very custom system. Anyway... I am just about there... and your help just now was fantastic. I moved that form down the page and its fine now.

The last part of the equation is that the file that is uploaded in this step also has to be e-mailed as an attachment. The file is uploaded, and the e-mail goes through, but the file isnt attached to the e-mail. Any ideas?

Sign in to reply to this post

neileisen207079

Ooops! It is all working!

Thanks Jason... it IS working. I made a slight change and changed the filename to be the server file name and it attached it fine.

Thanks again for everything

Sign in to reply to this post

Jason ByrnesWebAssist

Excellent,glad to hear it is working.

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