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.

Closed Thread
 
Thread Tools
  #1  
Old 02-19-2007, 03:09 PM
Sergeant First Class
 
Join Date: Feb 2007
Posts: 53
Default Parse error: syntax error

Need some assistance with the following error...

Parse error: syntax error, unexpected '"' in /home/xqfyxorw/public_html/uploadaction.php on line 62

From is to upload multiple files. Thanks!

<?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'];
@$upload2_Name = $_FILES['upload2']['name'];
@$upload2_Size = $_FILES['upload2']['size'];
@$upload2_Temp = $_FILES['upload2']['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 >500000)
{
//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 >500000)
{
//delete file
unlink($upload1_Temp);
header("Location: error.html");
exit;
}
}
if ($upload2_Size>0)
{
if( $upload2_Size >500000)
{
//delete file
unlink($upload2_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.myphotoflips.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.myphotoflips.com/uploads/".$upload1_Name" ; // Delete the red " off
}
if ($upload2_Size>0)
{
$uploadFile = "uploads/".$upload2_Name ;
@move_uploaded_file( $upload2_Temp , $uploadFile);
chmod($uploadFile, 0644);
$upload2_URL = "href="http://www.myphotoflips.com/uploads/".$upload2_Name ; // Delete the red part(S)
}
//Sending Email to form owner
$mailto = "photos@myphotoflips.com";
$mailsubj = "New Order";
$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 .= "File Link 3: $upload2_URL\n";
$mailbody .= "If any link is broken, please copy and paste it in your browser's address bar\n";
mail($mailto, $mailsubj, $mailbody, $mailhead);

header("Location: thankyou_page.html");
?>

xqfyxorw
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #2  
Old 02-19-2007, 04:21 PM
davidundalicia's Avatar
General & Forum Moderator
 
Join Date: Mar 2006
Location: Mallorca, Spain
Posts: 6,445
Default Re: Parse error: syntax error

It could well be this line:

$upload2_URL = "href="http://www.myphotoflips.com/uploads/".$upload2_Name ;

try this replacement:

$upload2_URL = "href="http://www.myphotoflips.com/uploads/".$upload2_Name" ;

(missing " )

p.s. I have not checked the whole script................
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old 02-19-2007, 05:51 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,523
Default Re: Parse error: syntax error

it should be :

$upload1_URL = "http://www.myphotoflips.com/uploads/".$upload1_Name ;

and similar for the second upload field.

You are not missing the ", you have it at the end of the line, whilst it should not be there.
__________________
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!
  #4  
Old 02-19-2007, 07:58 PM
Sergeant First Class
 
Join Date: Feb 2007
Posts: 53
Default Re: Parse error: syntax error

Thanks everyone. I have everything working now. I checked the html code and found the errors. Updated the php files in cp and everything is working now. Thanks again for the quick response!!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #5  
Old 02-19-2007, 08:04 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 10,523
Default Re: Parse error: syntax error

If you need so many upload fields, why don't you useAdvanced BlueVoda Form Processor ? it will not only upload the files, but it will also send them as attached files straight to your desktop! And, it will also provide you with field validation, security, autoresponder, customized headers and footers, and more!
__________________
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!
  #6  
Old 02-19-2007, 08:59 PM
Sergeant First Class
 
Join Date: Feb 2007
Posts: 53
Default Re: Parse error: syntax error

I have downloaded but have not had a chance to implement. It sounds great though and appreciate your assistance.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread


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 01:17 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, 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 204 205 206 207 208 209 210