![]() |
|
| |||||||
| Notices |
| Forms Discussion and help related to designing and implementing forms in the BlueVoda Website Builder. |
![]() |
| | Thread Tools |
|
#1
| ||||
| ||||
| 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:
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:
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
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:
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! |
|
#2
| ||||
| ||||
|
I can see that your not a L.G. for nothing Thats a great tip, and will try it out soon. Thanks *****.. |
|
#3
| ||||
| ||||
|
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. |
|
#5
| |||
| |||
|
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! |
|
#6
| ||||
| ||||
|
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! |
|
#8
| ||||
| ||||
| Quote:
__________________ 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! |
|
#12
| ||||
| ||||
| 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! |
|
#14
| |||
| |||
|
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 |
|
#16
| ||||
| ||||
|
I also would like to see a mod to upload multiple files.............
|
|
#17
| ||||
| ||||
| Quote:
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! |
|
#18
| |||
| |||
|
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.
|
|
#19
| ||||
| ||||
|
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 |
|
#20
| ||||
| ||||
|
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! |
|
#21
| ||||
| ||||
|
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....... |
|
#22
| ||||
| ||||
|
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! |
|
#23
| ||||
| ||||
|
emails received with many thanks.....
|
|
#24
| ||||
| ||||
|
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! |
|
#25
| ||||
| ||||
|
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! |
|
#26
| |||
| |||
|
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 |
|
#27
| ||||
| ||||
|
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! |
|
#28
| |||
| |||
|
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 |
|
#29
| ||||
| ||||
|
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! |
|
#30
| ||||
| ||||
|
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! |
|
#32
| |||
| |||
|
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 |
|
#33
| ||||
| ||||
|
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! |
|
#34
| |||
| |||
| Quote:
|
|
#35
| ||||
| ||||
|
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! |
|
#37
| ||||
| ||||
|
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! |
|
#38
| |||
| |||
|
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??
|
|
#39
| |||
| |||
|
uhh can anyone please help?
|
|
#40
| ||||
| ||||
|
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! |
|
#41
| |||
| |||
|
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 |
|
#42
| ||||
| ||||
|
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! |
|
#43
| |||
| |||
| Quote:
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! |
|
#44
| ||||
| ||||
|
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! |
|
#45
| |||
| |||
| Quote:
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 |
|
#47
| ||||
| ||||
|
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! |
|
#48
| |||
| |||
|
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?
|
|
#49
| |||
| |||
|
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... |
|
#50
| ||||
| ||||
|
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!) |
|
#51
| |||
| |||
|
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! |
|
#52
| ||||
| ||||
|
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!) |
|
#54
| ||||
| ||||
|
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! |
|
#55
| |||
| |||
|
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 |
|
#57
| ||||
| ||||
|
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! |
|
#58
| |||
| |||
| Quote:
|
|
#59
| |||
| |||
|
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... |
|
#60
| ||||
| ||||
|
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! |
|
#61
| |||
| |||
|
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 |
|
#62
| |||
| |||
|
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? |
|
#63
| ||||
| ||||
|
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! |
|
#64
| |||
| |||
|
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 |
|
#65
| ||||
| ||||
|
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! |
|
#68
| ||||
| ||||
|
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! |
|
#69
| |||
| |||
|
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"); ?> |
|
#70
| ||||
| ||||
|
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! |
|
#71
| |||
| |||
|
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 |
|
#72
| ||||
| ||||
|
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! |
|
#73
| |||
| |||
|
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 |
|
#74
| |||
| |||
|
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 |
|
#76
| ||||
| ||||
|
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! |
|
#77
| |||
| |||
| |
|
#79
| |||
| |||
| 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 Have a great day! Amb iJotiT! @ www.myijot.com |
|
#80
| ||||
| ||||
|
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! |
|
#81
| |||
| |||
|
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 |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |