The official web hosting company for the BlueVoda Website Builder. You are currently viewing our support forum as a guest which gives you limited (read only) access. By joining our support forum you will be able to ask questions, participate in discussions and receive assistance. Registration is fast and simple. Click Here To Join our support forum today! We look forward to helping you build and publish a fantastic website.
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:
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.comForms, 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!
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.comForms, 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!
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!!!
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.comForms, 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!
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??
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.comForms, 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!
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.
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.comForms, 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!
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!
Navaldesign Logger Lite:Low Cost, Customizable, multifeatured Login script Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart DBTechnosystems.comForms, 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!
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.
// 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 ($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 tothe 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?
Comment