![]() |
|
| |||||||
| Notices |
| Forms Discussion and help related to designing and implementing forms in the BlueVoda Website Builder. |
![]() |
| | LinkBack | Thread Tools |
|
#1
| |||
| |||
|
I have created a form per the directions of the tutorials and have entered the following code on the .php page as directed: <?PHP $mailto = "info@sfevcx.com"; $email = $HTTP_POST_VARS['email']; if ($email == "") { $email = $mailto; } $mailsubj = "Contact BIC"; $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"; } } mail($mailto, $mailsubj, $mailbody, $mailhead); ?> The form is still not functional and I am receiveing the error message: Parse error: syntax error, unexpected '<' in /home/qwxqsmue/public_html/action.php on line 40 Please help! What am I doing wrong. Suzanne |
|
#2
| ||||
| ||||
|
You are probably missing a ?> at the end of the php script you inserted onto you page,
__________________ Register/Login Script Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script |
|
#3
| ||||
| ||||
|
You have inserted your code twice, once between the head tags (which will not work) and then between the body tags. The second one is incomplete: $email = $HTTP_POST_VARS[email]; $mailto = "info@biccorp.com"; $mailsubj = "Contact Form Submission"; $mailhead = "From: $email\n"; reset ($HTTP_POST_VARS); $mailbody = "Values submitted from website form;\n"; while (list ($key, $val) = each ($HTTP_POST_VARS)) { You need to recreate the page from scratch, this time insert the full script between the body tags and it will work! Sarah
__________________ Sarah Anders Customer Service Manager +1-302-283-3777 USA / Canada / International (0044) 020 8816 8319 / 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! |
|
#4
| ||||
| ||||
|
Unless Sarah can see something that i cant, the script is correct. Only explanation, as Watdaflip said, you have forgotten (in the page, here it is correct) the closing tag <?PHP $mailto = "info@sfevcx.com"; $email = $HTTP_POST_VARS['email']; if ($email == "") { $email = $mailto; } $mailsubj = "Contact BIC"; $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"; } } mail($mailto, $mailsubj, $mailbody, $mailhead); ?> This last part in red is the one that you must have forgoten. And, to my knowledge, the code will work in whichever tag of the page html : Start of page (which i prefer), Between head, inside body, end of page. The php code is not like the html code, it is executed anywhere in the page 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! |
|
#5
| |||
| |||
|
Naval, Sarah, which is the correct code???? both PHP codes you have listed are different. Daniel Sarah's Code: $email = $HTTP_POST_VARS[email]; $mailto = "info@biccorp.com"; $mailsubj = "Contact Form Submission"; $mailhead = "From: $email\n"; reset ($HTTP_POST_VARS); $mailbody = "Values submitted from website form;\n"; while (list ($key, $val) = each ($HTTP_POST_VARS)) { Naval's Code: <?PHP $mailto = "info@sfevcx.com"; $email = $HTTP_POST_VARS['email']; if ($email == "") { $email = $mailto; } $mailsubj = "Contact BIC"; $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"; } } mail($mailto, $mailsubj, $mailbody, $mailhead); ?> |
|
#6
| ||||
| ||||
|
Sarah DID NOT post any code, she was merely stating that the code that BIC had used was incomplete. You can use the one i posted. This is the same one that is included in the Forms Tutorial Part 1.
__________________ 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! |