Web Hosting Vodahost    

Home Take The Royal Tour! Order Now Features Prices
Go Back   Web Hosting > BlueVoda Website Builder Forums > Forms

Notices

Forms Discussion and help related to designing and implementing forms in the BlueVoda Website Builder.

Reply
 
Thread Tools
  #1  
Old 05-13-2006, 04:10 PM
VodaHost's Avatar
General & Forum Administrator
 
Join Date: Mar 2005
Location: Wilmington, Delaware USA
Posts: 8,658
Talking How to upload a file using a form

The following tutorial will show you how to accomplish file uploads. However, since September 2006, the new Advanced BlueVoda Form Processor will do the same and much more. So please have a look at that also. And, since Jan 2007, ABVFP will also attach the files to the email that you receive with th erest of the form info.

Please also note that since summer 2008 BlueVoda's embedded Form processor, also has the ability to upload files to the server, and it will include the link to download the files, in the mail that you receive with the rest of the form info.

This tutorial is going to show you how to upload a file on your site using a form made in BlueVoda and a php script.
We assume that you are familiar with the basics about creating a form in BlueVoda, as well as with the basic php script provided there. If you are not, please read first the BlueVoda Form Tutorial 1

The below is an example of PHP script you may use for processing your forms data and uploading single files.. Please follow the instructions that follow to the letter. Please note that this is only an example script, that can be customized to better suit your needs.

Let’s start by explaining what we will do:
  • We will create a form in BlueVoda.
  • We will create a php script to process our form. Since we usually want a size limit for the files to be uploaded, this script will also check the file size, and if bigger than what we have set as maximum, will redirect the visitor to an error page. When informed about the error, he can use a “Back to form” button, to return to the form.
  • The script will also send an email to our email address, to inform us that a new file has been uploaded, and will provide us the link to this file.
  • We will create a “Thankyou Page, to inform our visitor that his file has been uploaded.
  • We will also create the necessary folder, where uploaded files will reside.
The working plan of our procedure is like in the following image:




Let’s start by creating a form. It will have some contact information, as well as an upload field.

It will look like the following image:




Please note that, in order to have the form work with the script as it is, the email field MUST be called email” and the upload field MUST be called upload”. It is also advisable that you name your Submit button "submit", all lowercase letters, as we have implemented three lines of code that will take care NOT TO INCLUDE the Submit button title and value, but this code will only work if the button is named "submit".
Set the form properties in:

Form name: Uploadform
Action: uploadaction.php
Method: POST
Encoding Type: multipart/formdata

As shown in the following image:





Now, let’s create the php script that will do the work.

Please copy the following code:

Quote:
<?php

// Receiving variables

@$email = addslashes($_POST['email']);
@$upload_Name = $_FILES['upload']['name'];
@$upload_Size = $_FILES['upload']['size'];
@$upload_Temp = $_FILES['upload']['tmp_name'];


// Validation for max file size

if ($upload_Size>0)
{
if( $upload_Size >1000000)
{
//delete file
unlink($upload_Temp);
header("Location: error.html");
exit;
}
$uploadFile = "uploads/".$upload_Name ;

@move_uploaded_file( $upload_Temp , $uploadFile);
chmod($uploadFile, 0644);
$upload_URL = "http://www.yourdomain.com/uploads/".$upload_Name ;
}

//Sending Email to form owner

$mailto = "youremail@yourdomain.com";
$mailsubj = "Enter Your Subject Here";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form :\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
if ($key!="submit")
{
$mailbody .= "$key : $val\n";
}
}
$mailbody .= "upload: $upload_URL\n";
mail($mailto, $mailsubj, $mailbody, $mailhead);

header("Location: thankyou_page.html");

?>
Please note that there are four parts in blue in the above code.

Open Notepad. Paste the above code. Now, change the above four parts in Blue with your actual values:

1000000 is the limit file size, in bytes ( 1 Mb = 1000000 bytes). You can set it to be whatever you want.
http://www.yourdomain.com/uploads is yourdomain name and folder (uploads) where the file will be uploaded. Please do not change the "uploads" part, as you would also need to modify the script.
Enter Your Subject Here : this is the email subject, change it to whatever you want.
Values submitted from web site form : : is the first line of your email. Change it to whatever you like.

Once you are done with the changes, click on File, Save As, select File Type : All files, and save the script on your computer as “uploadaction.php

Now lets create the Thankyou page. It will be a simple BV page, and will look like the following:




Make sure to put your menubar in this page, so the visitors can go on navigating your site.

Ok, we now need the error page: We will also create it in BV, and it will look as follows:




Make sure to
  • Include your menubar: so, if the visitor CANNOT reduce his file size under the allowed limit, he will at least be able to continue navigating your dite.
  • Add a “Back to form” button. This one is easy. Select from the form toolbar, in BV, “Advanced”, double click the text to make it “Back to form”, then right click it and select Properties, just like in the image below:
In the Advanced Button properties window that will appear, select the following (as in the image)


Name: optional, “Back”
Value: optional, “Back”
Button Type: “On Click”
OnClick Action: “Go to the previous Page”
just like in the image below:


If you wish you can also change the button style, but this goes beyond this tutorial purposes.


So, now you have the following BV pages:
  • uploadform
  • thankyou_page
  • error
Publish these pages in your public_html folder.

Open BlueFTP, connect, and UPLOAD the “uploadaction.php” file that you created in Notepad, in public_html also.

There is ONE LAST STEP: you need to create the “uploads” folder, for the files to be uploaded. So while you are in BlueFTP, click anywhere on the right window (the one with your site content). Now click on File, New Folder, and create this new folder named “uploads”. If you name it anything else, you will need to change the script accordingly. Now right click your new created folder, and set the permissions to 777.

Congratulations! You are done. Test your form.

Troobleshooting:

If the filename has blank spaces, the URL of the file that you will receive in your email, will be broken. In that case, clicking on the link will not work. You need to either download the file from your site using BlueFTP, or, if you want to see the file in your browser, you will need to copy the entire link in your browser’s address bar.




__________________
VodaHost
Your Website People!
1-302-283-3777 North America / International
07092887580 / United Kingdom

Military Ranking System Explained


Click Here to take the royal VodaHost Tour
Click Here for the VodaHost Help Centre & Tutorials
Got a question? - Try a forum search! Available at the top of every page!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old 05-13-2006, 04:14 PM
davidundalicia's Avatar
General & Forum Moderator
 
Join Date: Mar 2006
Location: Mallorca, Spain
Posts: 6,437
Default Re: How to upload a file using a form

I can see that your not a L.G. for nothing

Thats a great tip, and will try it out soon.

Thanks *****..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old 05-13-2006, 04:34 PM
Girlonthehill's Avatar
General
 
Join Date: Oct 2005
Location: England, UK
Posts: 4,241
Thumbs up Re: How to upload a file using a form

Nice one, Mon General!!
__________________
The moment one definitely commits oneself, then providence moves too. All sorts of things occur to help one that would never otherwise have occurred. A whole stream of events issues from the decisions, raising in one’s favor all manner of unforeseen incidents and meetings and material assistance which no man could have dreamed would have come his way. Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now. (William Hutchinson Murray)

Last edited by VodaHost; 05-13-2006 at 05:01 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old 07-10-2006, 11:23 PM
Private
 
Join Date: Jul 2006
Posts: 1
Default Re: How to upload a file using a form

wow thanks! your the man, thanks for the tip it will definetly help out.

Raf..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old 08-01-2006, 02:11 PM
Sergeant First Class
 
Join Date: Jun 2005
Location: Wirral, England
Posts: 50
Send a message via MSN to scousepete79
Talking Re: How to upload a file using a form

Now that Navaldesign has sorted out my form problem, I have another question. Is there any way that when someone uploads a file an automated e-mail is sent to them confirming that the file has been received? Almost like a receipt?

Thanks again Navaldesign!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old 08-01-2006, 07:18 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

Yes, transform the above script as follows:

<?php

// Receiving variables


@$email = addslashes($_POST['email']);
@$upload_Name = $_FILES['upload']['name'];
@$upload_Size = $_FILES['upload']['size'];
@$upload_Temp = $_FILES['upload']['tmp_name'];


// Validation for max file size

if ($upload_Size>0)
{
if( $upload_Size >1000000)
{
//delete file
unlink($upload_Temp);
header("Location: error.html");
exit;
}
$uploadFile = "uploads/".$upload_Name ;

@move_uploaded_file( $upload_Temp , $uploadFile);
chmod($uploadFile, 0644);
$upload_URL = "http://www.yourdomain.com/uploads/".$upload_Name ;
}

//Sending Email to form owner

$mailto = "youremail@yourdomain.com";
$mailsubj = "Enter Your Subject Here";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form :\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
if ($key!="submit")
{
$mailbody .= "$key : $val\n";
}
}
$mailbody .= "upload: $upload_URL\n";
mail($mailto, $mailsubj, $mailbody, $mailhead);

// Autoresponder
$mailto = $email;
$mailsubj = "Copy of the info you Sumbitted";
$mailhead = "From: your domain name or whatever you want\n";
mail($mailto, $mailsubj, $mailbody, $mailhead);

header("Location: thankyou_page.html");

?>


As usual, replace the part in blue with your own Subject and "From....."
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old 08-04-2006, 11:41 PM
Private
 
Join Date: Aug 2006
Posts: 1
Default Re: How to upload a file using a form

i have looked at this and done what it saids to do but i still can not get it to work i made the form but i dont get what is next can anyone help me make this page.i dont understand php
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old 08-05-2006, 09:07 AM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

Quote:
Originally Posted by jbyrd241
i have looked at this and done what it saids to do but i still can not get it to work i made the form but i dont get what is next can anyone help me make this page.i dont understand php
If you have built the form correctly, and you have published it, the next step is to build the "error" and "thankyou_page". Save them and publish them. Last, copy the above code in Notepad. Change the part in blue as per instructions. Save it as "uploadaction.php" on your computer. Use BlueFTP to upload it on your site.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old 08-05-2006, 12:21 PM
Staff Sergeant
 
Join Date: Nov 2005
Location: Surrey, UK
Posts: 46
Default Re: How to upload a file using a form

*****,

yet another great resource for us to use.

thanks
Stevea
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old 08-21-2006, 12:44 PM
Sergeant First Class
 
Join Date: Mar 2006
Location: UK
Posts: 52
Default Re: How to upload a file using a form

Yet another great Tutorial. This Forum has got to be 'THE FOUNT OF ALL KNOWLEDGE'!

My thanks to you all!

Brian
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old 08-24-2006, 03:08 PM
Corporal
 
Join Date: Aug 2006
Location: Midwest
Posts: 10
Default Re: How to upload a file using a form

Can you spell out the upload to the public_html from notepad part in fine detail for a complete and total nubeee? Please and Thankyou!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old 08-24-2006, 03:19 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

Open Notepad. Paste the above code. Now, change the above four parts in Blue with your actual values:

1000000 is the limit file size, in bytes ( 1 Mb = 1000000 bytes). You can set it to be whatever you want.

http://www.yourdomain.com/uploads is yourdomain name and folder (uploads) where the file will be uploaded. Please do not change the "uploads" part, as you would also need to modify the script.
Enter Your Subject Here : this is the email subject, change it to whatever you want.
Values submitted from web site form : : is the first line of your email. Change it to whatever you like.

Once you are done with the changes, click on File, Save As, select File Type : All files, and save the script on your computer as “uploadaction.php

I suggest that you save it inside your BlueVoda folder.

Sorry, but don't know how to make it simpler. Editing apart, the procedure is only 3 clicks.

As for the uploading part, open BlueVoda. Click on Tools, FTP Manager.

BlueFTP will appear, and your screen has your computer BlueVoda folder content in the left part.

Click on connect. If necessary, type in your IP, username and password, and click "connect". Now, the site content will appear in the right part of the screen.

Go to the left side, find the "uploadaction.php" file, and simply Drag and Drop it to the right part of the screen.
You are done!
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13  
Old 08-25-2006, 02:28 AM
Corporal
 
Join Date: Aug 2006
Location: Midwest
Posts: 10
Default Re: How to upload a file using a form

Thanks Navaldesign! I got it figured out.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14  
Old 09-01-2006, 11:57 AM
Private
 
Join Date: Jul 2006
Posts: 3
Smile Re: How to upload a file using a form

Hi Lt. General,

Please let me know what do you need to help me out on how to fix this script. I have my web page already complete but not able to launch because the image upload.

Thank you,
Edwin
cardone@coqui.net
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #15  
Old 09-03-2006, 05:10 PM
Corporal
 
Join Date: Aug 2006
Posts: 13
Default Re: How to upload a file using a form

lol ty bud named folder upload instead of uploads. it works great now
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #16  
Old 09-04-2006, 01:41 AM
davidundalicia's Avatar
General & Forum Moderator
 
Join Date: Mar 2006
Location: Mallorca, Spain
Posts: 6,437
Default Re: How to upload a file using a form

I also would like to see a mod to upload multiple files.............
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #17  
Old 09-04-2006, 11:09 AM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

Quote:
Originally Posted by davidundalicia
I also would like to see a mod to upload multiple files.............
UPLOADING MULTIPLE FILES

Ok, here is a script for uploading two files. The same structure can be adopted for multiple files, repeating the blocks as they appear in the script.
Please note that this script follows the same logical structure of the single upload field one, but with some additional checking: f.e. the size error checking has to be done for both upload fields BEFORE the script starts uploading. Then it has to check again, field by field, before it starts the real upload, otherwise you could have error headers sent out and the script broken, if f.e. one of the two fields is empty.
Please note that this is NOT what i would have used: a would have used a include file to minimise scripting. However, this would exceed the capabilities of the average user, as it would require more php files to be compiled and uploaded. This way instead, it is pretty straight.


<?php
// Receiving variables
@$email = addslashes($_POST['email']);
@$upload_Name = $_FILES['upload']['name'];
@$upload_Size = $_FILES['upload']['size'];
@$upload_Temp = $_FILES['upload']['tmp_name'];
@$upload1_Name = $_FILES['upload1']['name'];
@$upload1_Size = $_FILES['upload1']['size'];
@$upload1_Temp = $_FILES['upload1']['tmp_name'];

// Validation for max file size

// Validation for the first file, if it exists. Repeat the block as many times as your upload fields.

if ($upload_Size>0)
{
if( $upload_Size >1000000)
{
//delete file
unlink($upload_Temp);
header("Location: error.html");
exit;
}
}

// Validation for the second file, if it exists. In the additional blocks, change the number 1 to 2 or 3 or ... n

if ($upload1_Size>0)
{
if( $upload1_Size >1000000)
{
//delete file
unlink($upload1_Temp);
header("Location: error.html");
exit;
}
}
// Uploading the first file, if it exists. Repeat as many times as your upload fields.

if ($upload_Size>0)
{
$uploadFile = "uploads/".$upload_Name ;
@move_uploaded_file( $upload_Temp , $uploadFile);
chmod($uploadFile, 0644);
$upload_URL = "http://www.yourdomain.com/uploads/".$upload_Name ;

// Uploading the second file, if it exists.

if ($upload1_Size>0)
{
$uploadFile = "uploads/".$upload1_Name ;
@move_uploaded_file( $upload1_Temp , $uploadFile);
chmod($uploadFile, 0644);
$upload1_URL = "http://www.yourdomain.com/uploads/".$upload1_Name ; // You must change the number 1 to 2 or 3 or whatever in the additional blocks
}
//Sending Email to form owner
$mailto = "youremail@yourdomain.com";
$mailsubj = "Enter Your Subject Here";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form :\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
if ($key!="submit")
{
$mailbody .= "$key : $val\n";
}
}
$mailbody .= "File Link 1: $upload_URL\n"; // This line is to add the link to the first file. Repeat as many times as your upload fields
$mailbody .= "File Link 2: $upload1_URL\n"; // This line is to add the link to the second file.

$mailbody .= "If any link is broken, please copy and paste it in your browser's address bar\n";

mail($mailto, $mailsubj, $mailbody, $mailhead);

// Autoresponder: if you don't want the autoresponder, delete this and the following 7 lines in Green color



if ($Copy != "")
{
$mailto = $email;
$mailsubj = "Copy of the info you Submitted";
$mailhead = "From: put your site or company name here: \n";
mail($mailto, $mailsubj, $mailbody, $mailhead);
}




header("Location: thankyou_page.html");

?>

As always change the part s in blue to be your own details. The blocks can be repeated as many times as you want, to include as many upload fields as you want. The fields in the form should be named: upload, upload1, upload2, upload3, ...... upload(n) where n is the last field.

You can test the form here. If you tick the small bottom check box, you will receive a copy email of the info submitted, with the file kinks, so you can check yourself how the script works.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #18  
Old 09-04-2006, 04:24 PM
Corporal
 
Join Date: Aug 2006
Posts: 13
Default Re: How to upload a file using a form

Voda just plain ROCKS!!! thanks for the help im going to try this out. But was thinking, instead of letting them do multiple files at once and having to wait for them all to upload (risking them giving up). I might just add a "upload additional file form to the thankyou page.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #19  
Old 09-05-2006, 02:50 PM
davidundalicia's Avatar
General & Forum Moderator
 
Join Date: Mar 2006
Location: Mallorca, Spain
Posts: 6,437
Default Re: How to upload a file using a form

Very useful upload options, have installed and it worked first time.............

Well done *****, and Naval.

Naval, is it posible for you to email me the required code for your multiple forms project? I have looked at it twice and would now like to see it in its finshed form. Is that posible ? If so, then I will look forward to seeing it when I get back from my holiday(returning from Italy(Farinjana) 14th sep)

have fun
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #20  
Old 09-05-2006, 04:48 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

Ok David, but there is nothing more than what i posted in that thread.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #21  
Old 09-05-2006, 05:12 PM
davidundalicia's Avatar
General & Forum Moderator
 
Join Date: Mar 2006
Location: Mallorca, Spain
Posts: 6,437
Default Re: How to upload a file using a form

I would be interested in seeing how the code can take you from page to page at the review stage and also what results were sent to the client.

It looks pretty good to me and I could posibly use almost the exact forms and content for another of our forum members.

You are a gentleman naval and one of the main springs of these forums.

Hasta la vista amigo mio..............until the next time my friend.......
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #22  
Old 09-05-2006, 08:41 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

Mails sent David
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #23  
Old 09-05-2006, 10:27 PM
davidundalicia's Avatar
General & Forum Moderator
 
Join Date: Mar 2006
Location: Mallorca, Spain
Posts: 6,437
Default Re: How to upload a file using a form

emails received with many thanks.....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #24  
Old 09-05-2006, 10:31 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

You are welcome
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #25  
Old 09-07-2006, 01:26 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

To anyone interested: A more elegant code for uploading multiple files, can be found in http://www.vodahost.com/vodatalk/for...form-help.html
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #26  
Old 09-08-2006, 06:35 PM
Corporal
 
Join Date: Aug 2006
Posts: 13
Post Re: How to upload a file using a form

Hi,
I've built my first website and everything works fine in preview and on my home pc. However, my stepson, who is beta testing my site repots that my contact page is not working. I downloaded the free contact form that David advertised as it suits my needs perfectly. Mal reports that when he goes to the contat page, he cannot enter a name. It just won't accept it, and he gets the error message. Any suggestions? The site is www.sidrheuban.com. Thanks, Elaine
__________________
Elaine K Keeler
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #27  
Old 09-08-2006, 08:03 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

It worked fine for me, however your Comments fiels is (maybe) covered by something, because i could not directly click on it to type in. However, no error messages.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #28  
Old 09-08-2006, 08:40 PM
Corporal
 
Join Date: Aug 2006
Posts: 13
Post Re: How to upload a file using a form

Thank you for checking this. I noticed the problem with getting the cursor to appear in the comments box. I can't find anything overlaying it. A cursor does appear if you click on the scroll bar and then everything works fine, for me at least. Perhaps Mal's problem has something to do with his web browser. I read that someone was having trouble with some of the fields and a response was that Yahoo may be causing it. Maybe I need another beta-tester!
Elaine
__________________
Elaine K Keeler
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #29  
Old 09-08-2006, 08:57 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

Please select the form fields, one at a time, and bring them in front. Then save your page and publish again.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #30  
Old 09-08-2006, 09:42 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

Also, do NOT set the fields background to be transparent. This, some times, has this effect.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #31  
Old 09-09-2006, 03:37 PM
Corporal
 
Join Date: Aug 2006
Posts: 13
Default Re: How to upload a file using a form

Great, thanks. It all works fine now. Even my stepson can do it!
Elaine
__________________
Elaine K Keeler
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #32  
Old 11-19-2006, 07:57 AM
First Lieutenant
 
Join Date: Nov 2006
Posts: 180
Send a message via AIM to clanffa
Default Re: How to upload a file using a form

I have a problem with this.
My website is http://www.ffaproam.com/
And the upload page is http://www.ffaproam.com/uploadform.php
My problem is, when someone fills out the info and clicks submit it works fine but the file doesnt get uploaded or anything. I have used BlueFTP and made a file in public_html called uploads. I made its permision777. I added the php script in notepad, editied it, and put that into public_html using BlueFTP. Also, when I get the e-mail after someoen fills out the upload form, it has their video name, e-mail, but where the upload link is it looks like this basicly:
Video Name:Test
E-mail:Jackshinta@ffaproam.com
upload:

Upload is blank
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #33  
Old 11-19-2006, 08:01 AM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

Please look at the other thread you have posted. And post here the php script code.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #34  
Old 11-19-2006, 08:18 AM
First Lieutenant
 
Join Date: Nov 2006
Posts: 180
Send a message via AIM to clanffa
Default Re: How to upload a file using a form

Quote:
<?php

// Receiving variables

@$email = addslashes($_POST['email']);
@$upload_Name = $_FILES['upload']['name'];
@$upload_Size = $_FILES['upload']['size'];
@$upload_Temp = $_FILES['upload']['tmp_name'];


// Validation for max file size

if ($upload_Size>0)
{
if( $upload_Size >200000000)
{
//delete file
unlink($upload_Temp);
header("Location: error.html");
exit;
}
$uploadFile = "uploads/".$upload_Name ;

@move_uploaded_file( $upload_Temp , $uploadFile);
chmod($uploadFile, 0644);
$upload_URL = "http://www.ffaproam.com/uploads/".$upload_Name ;
}

//Sending Email to form owner

$mailto = "jackshinta@ffaproam.com";
$mailsubj = "Video Upload";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Video Upload Details :\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
if ($key!="submit")
{
$mailbody .= "$key : $val\n";
}
}
$mailbody .= "upload: $upload_URL\n";
mail($mailto, $mailsubj, $mailbody, $mailhead);

header("Location: thankyou_page.html");

?>
OK Here's that php script you have asked for!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #35  
Old 11-19-2006, 08:25 AM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

Ok, your problem is very simple: you have renamed your upload field, in the form, in "uploadfile" while in the script is "upload". That is why you don't get a value or actual upload. Rename it back to "upload" and it should work.

Also, please note that php will not allowyou to upload files bigger than 52 MB (you have set it to 200 MB). Files bigger than 52 MB can only be FTPed
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #36  
Old 11-19-2006, 08:29 AM
First Lieutenant
 
Join Date: Nov 2006
Posts: 180
Send a message via AIM to clanffa
Default Re: How to upload a file using a form

Thank you so much navaldesign!!!!!!!!!!!
You rock my socks off!!!!!!!!!
YAY Now My clan Members can upload their montages!!
THIS IS THE ULTIMATE FORUNTAIN OF KNOWLEDGE!!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #37  
Old 11-19-2006, 08:41 AM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

Please note that you have published the corrected form as php. Correct the extension back to html and publish again
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #38  
Old 11-23-2006, 09:07 PM
First Lieutenant
 
Join Date: Nov 2006
Posts: 180
Send a message via AIM to clanffa
Default Re: How to upload a file using a form

Another question. Ive set the upload to 200mb max. Is there anyway I can add a gile upload progress bar? maybe one that pops up inot a new window which states how much the progress the file is in uploading and the file name? similiar to useruploads.mythica.org??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #39  
Old 11-23-2006, 10:43 PM
First Lieutenant
 
Join Date: Nov 2006
Posts: 180
Send a message via AIM to clanffa
Default Re: How to upload a file using a form

uhh can anyone please help?
__________________
Clan FFA-Halo 2 MLG, Machinima, and Glitch Clan
http://www.ffaproam.com/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #40  
Old 11-24-2006, 05:42 AM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

A progress bar requires the use of Javascript and AJAX together with PHP. I have only found one script on the net about this, but seems that the relative download link is no more functioning.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #41  
Old 12-12-2006, 06:32 AM
Private
 
Join Date: Dec 2006
Posts: 2
Default How To Prevent Files From Being Overwritten

I know in frontpage you can set folder properties so file uploads can not overwrite existing files. If a uploaded did this the form would redirect them to an error page stating to rename the file and try again.

I am trying to get away from using frontpage, so I used your code from above to modify my form. I had to combine some of the validation to get it to work... I kept getting an Parse error: parse error, unexpected $ in the last line.

However, I'm affraid that some people may have the same file name when uploading photos... Is their something I can add to the script to prevent overwriting and a possible error page telling them how to correct the problem. Or even a number being automaticly added to the file name.

Is it possible to send the information to a file on the server too? Thanks for the help in advance. I'll send you a digital music coupon.

Here is my form:
http://www.capitalareaapartments.com/uploadform.htm

Code:

<?php
// Receiving variables
@$email = addslashes($_POST['email']);
@$upload1_Name = $_FILES['upload1']['name'];
@$upload1_Size = $_FILES['upload1']['size'];
@$upload1_Temp = $_FILES['upload1']['tmp_name'];
@$upload2_Name = $_FILES['upload2']['name'];
@$upload2_Size = $_FILES['upload2']['size'];
@$upload2_Temp = $_FILES['upload2']['tmp_name'];
// Validation for max file size
if ($upload1_Size>0)
{
if( $upload1_Size >1000000)
{
//delete file
unlink($upload1_Temp);
header("Location: error.html");
exit;
}
$uploadFile = "uploads/".$upload1_Name ;
@move_uploaded_file( $upload1_Temp , $uploadFile);
chmod($uploadFile, 0644);
$upload1_URL = "<A href="http://www.capitalareaapartments.com/uploads/".$upload1_Name">http://www.capitalareaapartments.com/uploads/".$upload1_Name ;
}
if ($upload2_Size>0)
{
if( $upload2_Size >1000000)
{
//delete file
unlink($upload2_Temp);
header("Location: error.html");
exit;
}
$uploadFile = "uploads/".$upload2_Name ;
@move_uploaded_file( $upload2_Temp , $uploadFile);
chmod($uploadFile, 0644);
$upload2_URL = "<A href="http://www.capitalareaapartments.com/uploads/".$upload2_Name">http://www.capitalareaapartments.com/uploads/".$upload2_Name ;
}
//Sending Email to form owner
$mailto = "sales@capitalareaapartments.com";
$mailsubj = "Ad Listing";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form :\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
if ($key!="submit")
{
$mailbody .= "$key : $val\n";
}
}
$mailbody .= "upload1: $upload1_URL\n";
$mailbody .= "upload2: $upload2_URL\n";
mail($mailto, $mailsubj, $mailbody, $mailhead);
header("Location: orderconfirm.htm");
?>


Thank you for the code, it was the only site that explained it perfectly!!!
-Tony
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #42  
Old 12-12-2006, 07:05 AM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

Yes, there are scripts that will make an incremental saving. Since this is only a forum for our members, not for programming talk, we do no go so deep in the scripts that we post. Go in php.net and see the upload function parametres, i beleive there are some examples of how to make incremental save.

Now, as for your script, it seems correct (apart the part that has been modified by this forum's text editor, pursing links even when it shouldn't)

Does the script get to upload the files and send the mail ? or doesn't it ?

And yes, you can write the data in a file on your server. I simply never use this method, as i prefer storing all the info in a database. The database approach allows for research features, dynamic resizing of the images, realtime registration of the users, anyminute editing possibilities, payment followup, etc. But this exceeds the tutorial's purposes.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #43  
Old 12-12-2006, 07:19 AM
Private
 
Join Date: Dec 2006
Posts: 2
Default Re: How to upload a file using a form

Quote:
Originally Posted by navaldesign
Now, as for your script, it seems correct (apart the part that has been modified by this forum's text editor, pursing links even when it shouldn't)

Does the script get to upload the files and send the mail ? or doesn't it ?

And yes, you can write the data in a file on your server. I simply never use this method, as i prefer storing all the info in a database. But this exceeds the tutorial's purposes.


Yes, it uploads the file and sends the email containing the links to the photos. I've spent countless hours trying to get a php form to work... got yours to work in 10 minutes. Thanks... I'll take a look at the php site. I didn't even realize you are in Italy!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #44  
Old 12-12-2006, 07:30 AM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

Have a look at http://it.php.net/manual/en/function...oaded-file.php
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #45  
Old 08-15-2007, 01:54 PM
Private
 
Join Date: Aug 2007
Posts: 2
Default Re: How to upload a file using a form

Quote:
Originally Posted by navaldesign View Post
UPLOADING MULTIPLE FILES

Ok, here is a script for uploading two files. The same structure can be adopted for multiple files, repeating the blocks as they appear in the script.
Please note that this script follows the same logical structure of the single upload field one, but with some additional checking: f.e. the size error checking has to be done for both upload fields BEFORE the script starts uploading. Then it has to check again, field by field, before it starts the real upload, otherwise you could have error headers sent out and the script broken, if f.e. one of the two fields is empty.
Please note that this is NOT what i would have used: a would have used a include file to minimise scripting. However, this would exceed the capabilities of the average user, as it would require more php files to be compiled and uploaded. This way instead, it is pretty straight.


<?php
// Receiving variables
@$email = addslashes($_POST['email']);
@$upload_Name = $_FILES['upload']['name'];
@$upload_Size = $_FILES['upload']['size'];
@$upload_Temp = $_FILES['upload']['tmp_name'];
@$upload1_Name = $_FILES['upload1']['name'];
@$upload1_Size = $_FILES['upload1']['size'];
@$upload1_Temp = $_FILES['upload1']['tmp_name'];

// Validation for max file size

// Validation for the first file, if it exists. Repeat the block as many times as your upload fields.

if ($upload_Size>0)
{
if( $upload_Size >1000000)
{
//delete file
unlink($upload_Temp);
header("Location: error.html");
exit;
}
}

// Validation for the second file, if it exists. In the additional blocks, change the number 1 to 2 or 3 or ... n

if ($upload1_Size>0)
{
if( $upload1_Size >1000000)
{
//delete file
unlink($upload1_Temp);
header("Location: error.html");
exit;
}
}
// Uploading the first file, if it exists. Repeat as many times as your upload fields.

if ($upload_Size>0)
{
$uploadFile = "uploads/".$upload_Name ;
@move_uploaded_file( $upload_Temp , $uploadFile);
chmod($uploadFile, 0644);
$upload_URL = "http://www.yourdomain.com/uploads/".$upload_Name ;

// Uploading the second file, if it exists.

if ($upload1_Size>0)
{
$uploadFile = "uploads/".$upload1_Name ;
@move_uploaded_file( $upload1_Temp , $uploadFile);
chmod($uploadFile, 0644);
$upload1_URL = "http://www.yourdomain.com/uploads/".$upload1_Name ; // You must change the number 1 to 2 or 3 or whatever in the additional blocks
}
//Sending Email to form owner
$mailto = "youremail@yourdomain.com";
$mailsubj = "Enter Your Subject Here";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form :\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
if ($key!="submit")
{
$mailbody .= "$key : $val\n";
}
}
$mailbody .= "File Link 1: $upload_URL\n"; // This line is to add the link to the first file. Repeat as many times as your upload fields
$mailbody .= "File Link 2: $upload1_URL\n"; // This line is to add the link to the second file.

$mailbody .= "If any link is broken, please copy and paste it in your browser's address bar\n";

mail($mailto, $mailsubj, $mailbody, $mailhead);

// Autoresponder: if you don't want the autoresponder, delete this and the following 7 lines in Green color



if ($Copy != "")
{
$mailto = $email;
$mailsubj = "Copy of the info you Submitted";
$mailhead = "From: put your site or company name here: \n";
mail($mailto, $mailsubj, $mailbody, $mailhead);
}




header("Location: thankyou_page.html");

?>

As always change the part s in blue to be your own details. The blocks can be repeated as many times as you want, to include as many upload fields as you want. The fields in the form should be named: upload, upload1, upload2, upload3, ...... upload(n) where n is the last field.

You can test the form here. If you tick the small bottom check box, you will receive a copy email of the info submitted, with the file kinks, so you can check yourself how the script works.

Hi, Having some trouble getting this script to run, the single upload version works fine, however this one fails on the rediret, both on the error redirect and the thank you one.

I get the following message:

Parse error: syntax error, unexpected $end in /home/gopriva1/public_html/test/uploadaction.php on line 93

Yet if I switch back to the single upload version all works fine. Am I missing sometihng?

Many thanks
Chris
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #46  
Old 08-15-2007, 02:10 PM
Private
 
Join Date: Aug 2007
Posts: 2
Default Re: How to upload a file using a form

AHA!

I think i've got it working now, didn't notice the form tony had posted, once I edited the links and updated the form field names it works a treat.

Thanks tony et all.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #47  
Old 08-15-2007, 05:30 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

Why don't you use ABVFP ? it will take care of as many uploads you like, and will also attach the files to the email that you will receive. It also allows autoresponder, multiple choice dropdowns and a lot more. And, if you want, it will also store the form info in a database.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #48  
Old 08-17-2007, 09:45 PM
Staff Sergeant
 
Join Date: Aug 2007
Location: USA
Posts: 46
Default Re: How to upload a file using a form

I was able to set up a dwnload link. The only problem is the file begins to play once dwnloaded. The file I have is a Flash MC file to be used for websites. Is there a way to have it dwnload onto the users desktop as a file to be used later?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #49  
Old 09-26-2007, 01:19 PM
Private
 
Join Date: Aug 2007
Posts: 4
Default Re: How to upload a file using a form

Could someone let me know what I did wrong? I got everything to work right except on the thank you page, a bunch of script appears at the very top (from the uploadaction.php part).

Everything works except that (the form, the file upload, the thank you page... ). I don't know anything about code, so I don't want to start messing with what I don't know how to read.

www.TreasuredXpressions.com/Order.html
which leads to www.TreasuredXpressions.com/thankyou_page.html


Thanks in advance...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #50  
Old 09-26-2007, 01:55 PM
Andy128's Avatar
Major General
 
Join Date: Dec 2005
Location: Michigan
Posts: 2,308
Default Re: How to upload a file using a form

Will'smom,

You have placed php code inside the thank_you.html page and that is why it is showing up. The action of the form is set to uploadaction.php and this is where the php code should be. At first glance, I would say simply delete any php code that you have placed in the thank_you.htmll page and it should be ok.

First- can you give the url of the instructions you followed to get this far?
We will take a look at it and then go from there.

Andy
__________________
My diamond in the rough - www.123gpp.com

* Click here for some BV tutorials (Php mailto Form, I-Frames, Picture display and much, much more!)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #51  
Old 09-26-2007, 02:03 PM
Private
 
Join Date: Aug 2007
Posts: 4
Default Re: How to upload a file using a form

Thank you so much. It was about midnight last night when I was working on that and I was getting so frustrated...then I forgot my password into the forums and got locked out.
Anyway, I forgot that I accidently put the script in the thank you page, so I just deleted it and it works beautifully. I had just followed the tutorials above (but when you're tired, sometimes you skip a step and have to go back...then things get messed up!)

By the way, can you tell me how to have a link on the page that will allow the user download a file (i.e., word document). I'm sure it's easy, but I've fiddled with it this morning and it's not working.

Thanks again!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #52  
Old 09-26-2007, 02:07 PM
Andy128's Avatar
Major General
 
Join Date: Dec 2005
Location: Michigan
Posts: 2,308
Default Re: How to upload a file using a form

Just link it the normal way with the hyperlink button. The way it works is that they right lick on the link and then choose "save target as" to their computer. Thats it.

Gald all is well with the form.

Cheers-
Andy
__________________
My diamond in the rough - www.123gpp.com

* Click here for some BV tutorials (Php mailto Form, I-Frames, Picture display and much, much more!)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #53  
Old 10-12-2007, 04:57 PM
ericacrosley's Avatar
Sergeant
 
Join Date: Oct 2007
Location: Arlington, TX
Posts: 31
Default Re: How to upload a file using a form

I'm confused as to Notepad. Is that the HTML on the form or on the page?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #54  
Old 10-12-2007, 10:57 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

No, it is a self standing file. You create it in Notepad and you upload it in your file using FTP.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #55  
Old 11-26-2007, 02:52 PM
Private First Class
 
Join Date: Jul 2006
Posts: 7
Default Don't allow bigger files

Hello!

I was trying to upload files using different scripts including BV one explained here but I have problems with size limit. I think the server don't allow to upload files bigger than 2MB...

I changed the limit into the script to $upload_Size >1000000000.

The upload form is installed on a Voda hosting, http://www.normal.ro/sbs/1.html

Is anyone who knows how can I make server let me upload bigger files?

Thanks,
Sebastian
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #56  
Old 11-26-2007, 03:21 PM
Private First Class
 
Join Date: Jul 2006
Posts: 7
Default Re: How to upload a file using a form

... and no error is displayed while a file is bigger than 2MB...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #57  
Old 11-26-2007, 03:25 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

Depending on the server settings, php will allow you to upload files up to 52 MB. Usually VH servers are set to 4.77 Mb.

1000000000 that you have set, is 1 Gb !!!

The script WILL give an error if the size is bigger than the set limit. Of course, if you have it set at 1 Gb, you will get no error message, though the file will not be uploaded if bigger than the server settings.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #58  
Old 11-26-2007, 03:30 PM
Private First Class
 
Join Date: Jul 2006
Posts: 7
Default Re: How to upload a file using a form

Quote:
Originally Posted by navaldesign View Post
Depending on the server settings, php will allow you to upload files up to 52 MB. Usually VH servers are set to 4.77 Mb.

1000000000 that you have set, is 1 Gb !!!

The script WILL give an error if the size is bigger than the set limit. Of course, if you have it set at 1 Gb, you will get no error message, though the file will not be uploaded if bigger than the server settings.
I will need to upload files between 10 and 200MB (video files)... This VH server seems to be set to 2MB, as 1.9MB files are uploaded and 2.1MB are not... Do you have any idea what can I do to change the server limit?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #59  
Old 11-26-2007, 03:33 PM
Private First Class
 
Join Date: Jul 2006
Posts: 7
Talking Re: How to upload a file using a form

I know that I changed the file limit to 1GB, I just wanted to be sure that I can upload any file I want until I get it fixed...

Even the php 52 MB can be a reasonable limit... but 2MB is much to low...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #60  
Old 11-26-2007, 03:44 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

You can NOT set the server limit, VH sets it. Usually only 4.77 is allowed. For larger files you need to use FTP or File Manager. Seems strange that 2.1 Mb is not uploaded, as said most VH servers are set to 4.77.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #61  
Old 11-26-2007, 03:50 PM
Private First Class
 
Join Date: Jul 2006
Posts: 7
Default Re: How to upload a file using a form

Maybe VH lowered the limit to 2MB... However, it's very annoying, I'll try to talk with VH guys about that because I cannot teach my client how to use FTP to upload his videos on his website

Anyway, thanks for your help!
Sebastian
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #62  
Old 11-27-2007, 06:42 PM
Private
 
Join Date: Jan 2006
Posts: 2
Default Re: How to upload a file using a form

Can some help, I tried all this and (the steps to allow visitors upload flies and images) but when I try my upload form and click submit it says this;

Not Found

The requested URL /uploadaction.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.




why is this can someone help?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #63  
Old 11-27-2007, 07:14 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

Did you create the "uploadaction" page and publish it as php ?
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #64  
Old 12-12-2007, 04:38 AM
Sergeant
 
Join Date: Oct 2007
Posts: 32
Default Re: How to upload a file using a form

hi...i know this thread was from a long time ago and i'm hoping i can still get some help... i followed these instructions as best i could, then when i tried to test my form, it came up with a screen saying
"Parse error: syntax error, unexpected $end in /home/ezioxokc/public_html/members/uploadaction.php on line 156"
could someone please tell me what this means and what i've done wrong?
this is gonna sound stupid but was i meant to delete the red writing? is that what i did wrong? or is it because i put it into a password protected directory inside the public_html folder?

sorry to be such a pain!

thanks, jess

P.S. i have tried ABVFP but it doesn't seem to agree with me :( but now i appear to be having the same trouble with this way...
__________________
www.sportsterriderssa.com

Last edited by jessyh89; 12-12-2007 at 04:52 AM. Reason: more info
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #65  
Old 12-12-2007, 05:55 AM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

ABVFP is far more versatile than this script. And it will also mail you the attached files.

However, we can't help you with this error, because this depends on your code. You must have missed a closing } somewhere.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #66  
Old 04-22-2008, 09:01 PM
Private
 
Join Date: Apr 2008
Posts: 2
Default Re: How to upload a file using a form

Hello, how can i make the script to filter the file extensions?

Like i want that possible file types to upload are just .ZIP and .PNG
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #67  
Old 04-25-2008, 05:51 PM
Private
 
Join Date: Apr 2008
Posts: 2
Default Re: How to upload a file using a form

Can someone help me please? Or can someone suggest me... How to protect the upload from hackers?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #68  
Old 04-25-2008, 11:28 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

You need to use a code like

$upload_Name1 = $_FILES[$file_key]['name'];
$upload_Name = $prefix.str_replace(" ", "_", $upload_Name1);
$upload_Size = ($_FILES[$file_key]['size']);
$upload_Temp = ($_FILES[$file_key]['tmp_name']);
$upload_Type = ($_FILES[$file_key]['type']);
if($upload_Type != "image/gif" AND $upload_Type != "image/pjpeg" AND $upload_Type != "image/jpeg" AND $upload_Type != "image/png" AND $upload_Type != "image/tiff" AND $upload_Type != "image/bmp"){
$error1 = "$file_key file type is '$upload_Type' which is not allowed! \n";
// Add here a "include" command to include an error page
}
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #69  
Old 07-08-2008, 04:09 PM
Sergeant
 
Join Date: Mar 2008
Posts: 22
Default Re: How to upload a file using a form

Hello Mr. Naval, can you please tell me what I did wrong here with code for uploading a file to my site. I use the same code that you presented, the only thing I change was the filesize from 1000000 (1mb) to 30000000 (30mb). Here is my problem: the code only takes file the have size from 7-8mb. But when I try to send a file with size 11mb the code did not show the error_page and it sent a blank email to me with a blank subject. And it kick off the thank_page to let the user know that their file was successfully sent. BUT NO FILE WAS UPLOADED. Can you tell me what I did wrong. Thanks.

====+++ uploaded code I used +++====

<?php
// Receiving variables
@$email = addslashes($_POST['email']);
@$upload_Name = $_FILES['upload']['name'];
@$upload_Size = $_FILES['upload']['size'];
@$upload_Temp = $_FILES['upload']['tmp_name'];

// Validation for max file size
if ($upload_Size>0)
{
if( $upload_Size > 30000000)
{
//delete file
unlink($upload_Temp);
header("Location: error.html");
exit;
}
$uploadFile = "uploads/".$upload_Name ;
@move_uploaded_file( $upload_Temp , $uploadFile);
chmod($uploadFile, 0644);
$upload_URL = "http://www.vietnam4christ.org/uploads/".$upload_Name ;
}
//Sending Email to form owner
$mailto = "wesleyvinhvan@vietnam4christ.org";
$mailsubj = "New Song Upload";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "File submitted:\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
if ($key!="submit")
{
$mailbody .= "$key : $val\n";
}
}
$mailbody .= "upload: $upload_URL\n";
mail($mailto, $mailsubj, $mailbody, $mailhead);
// Autoresponder
$mailto = $email;
$mailsubj = "Song you Sumbitted";
$mailhead = "From: Vietnam4christ.org\n";
mail($mailto, $mailsubj, $mailbody, $mailhead);
header("Location: thankyou_page.html");
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #70  
Old 07-08-2008, 05:29 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

Hi Wesley,
First, i don't understand why you use this script. You have installed ABFP if i recall, and ABVFP can handle file uploads easire, automatically, so why do you use a separate script ?
Second: with php there are server side limitations to the size of file you can upload. Usually it is set to 8 Mb on VH servers, in some cases to 12 Mb. A file bigger than that will cause ANY upload script to break.

It is possible to increase the max file size, using a local php.ini file, for a maximum of 52 Mb which is the limit for php.
However, creating a local php.ini file, can be somewhat tricky and it is not advisable that you do it unless you have some php experiense. Or it could mess your account.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #71  
Old 08-12-2008, 12:32 AM
Rui Carlos
 
Join Date: Aug 2008
Location: Parede - Portugal
Posts: 3
Question Re: How to upload a file using a form

Hello i did everything was you explained but i still have an error when i try to upload files could you pls take a look in http://mobilarte-pt.cybercafedalinha.com/uploadform.php
maybe i'm doing something wrong i don't know i review all several times and i can't see what is wrong.
thank's in advance
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #72  
Old 08-12-2008, 01:11 AM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

Don't use this script, it is an old one. Use he built in form processor, it can upload files.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #73  
Old 08-13-2008, 02:52 AM
Rui Carlos
 
Join Date: Aug 2008
Location: Parede - Portugal
Posts: 3
Smile Re: How to upload a file using a form

Thank's Naval for your help is working great.
Each day i feel that i made a great choice chosing Blue Voda.
Thank You all for your help in the tutorials and forums .

www.asuaempresaonline.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #74  
Old 01-05-2009, 08:25 PM
Corporal
 
Join Date: Apr 2007
Posts: 14
Default Re: How to upload a file using a form

Dear Naval

Re having the facility to upload photo files

Have used the file wizard to do a form which comprises of 1 text field and 6 upload files and a submit button.
When I test it it seems to upload photos ok, but when I check my mail box the resulting email mentions the text box and submit button but no mention of the upload files and no attached photos.

What have I done wrong?

Many thanks, Gordon
Happy New Year
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #75  
Old 01-05-2009, 09:38 PM
Corporal
 
Join Date: Apr 2007
Posts: 14
Default Re: How to upload a file using a form

It has just dawned on me that the problem might be that I'm using an AOL email address, would that be the case?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #76  
Old 01-05-2009, 09:48 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

No, it has nothing to do with it. A link to the form please ?
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #77  
Old 01-05-2009, 10:29 PM
Corporal
 
Join Date: Apr 2007
Posts: 14
Default Re: How to upload a file using a form

Hi Naval
Thanks in anticipation, Gordon

http://www.cheaperpages.com/partthree.php
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #78  
Old 01-06-2009, 12:55 PM
Corporal
 
Join Date: Apr 2007
Posts: 14
Default Re: How to upload a file using a form

Hi Naval, Cracked it!

Went to one of your previous threads and found the answer which was that I hadn't named the fields properly.

Cheers, happy now!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #79  
Old 01-12-2009, 07:55 PM
Corporal
 
Join Date: Dec 2008
Posts: 19
Talking Re: How to upload a file using a form

Now right click your new created folder, and set the permissions to 777

Thank you for all the info! I really needed this for my site The only thing I cannot figure out how to do is set the permissions to 777. I am in the Permissions for Upload file properties, but do not know exactly what to do from there. Thanks for your help!
Have a great day!

Amb

iJotiT! @ www.myijot.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #80  
Old 01-12-2009, 08:16 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,049
Default Re: How to upload a file using a form

if you are a VH customer, you don't need to use this script (this is old fashioned!)

Simply use the Form Wizard and it's built in Form Processor, OR use ABVFP.

They can both take care automatically of everything!

If you are not a VH customer, use ABVFP which runs on any server that supports MySQL /php

Last. if you insist on using this script, connect to your site with FTP, select the folder you use for the uploads, select Permissions (or properties, for some FTP softwares) and set them to 777.
__________________
Navaldesign
Logger Lite: Low Cost, Customizable, multifeatured Login script
Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #81  
Old 01-12-2009, 08:54 PM
Corporal
 
Join Date: Dec 2008
Posts: 19
Default Re: How to upload a file using a form

Okay, now I am totally lost..LOL.....I am a VH customer and very very new at forms. I did build the form with the wizard but it won't submit. As far as the permissions, just leave it alone because I used the wizard? Sorry to be a pain, I did not realize this was old (oops)
Thanks for your help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT +1. The time now is 11:11 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC7
2005-2009 VodaHost Web Hosting Your Perfect Web Host - All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203