Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Created a contact page exactly as instructed. But it does not work. See link: https://www.megabike.li And when I fill in the form, this text appears: Parse error: syntax error, unexpected 'for' (T_STRING), expecting ';' or ',' in /srv/www/vhosts/megabike.li/httpdocs/contact.php on line 102 What am I doing wrong? The hosting server is set up for .php. - Thank you for your help. |
||||
|
Difficult to say without seeing the code, it sounds like you have a typo somewhere. Best would be to send your .rcd file or code to support, they will find the problem quickly. |
||||
|
Thanks, Erik. This is the code: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="generator" content="RocketCake"> <title></title> <link rel="stylesheet" type="text/css" href="index_html.css"> </head> <body> <div class="textstyle1"> <form action="contact.php" enctype="application/x-www-form-urlencoded" method="POST" id="form_e4bf9ac"><div id="form_e4bf9ac_padding" ><div class="textstyle1"><div id="container_64f37254"><div id="container_64f37254_padding" ><div class="textstyle1"> <span class="textstyle2">Mail-Adresse<br/><br/>Text:</span> </div> </div></div><input type="text" value="" title="" name="TextEdit1" id="edit_780a4201" > <textarea name="Text" title="" cols="33" rows="17" id="edit_3f14847d"></textarea> <input name="Button1" type="submit" value="Senden" title="" id="button_499f9dd1" > </div> <div style="clear:both"></div></div></form><div id="php_3984735a"><?PHP $text = ""; foreach($_POST as $name => $value) { $text .= "$name : $value\n"; } if ($text != "") { echo ‚Thanks for contacting us.‘; mail("sigi.scherrer@adon.li", "Contact form request", $text); ?></div> </div> </body> </html> |
||||
|
One error I can see are the quotes around the "Thanks for contacting us" text. They schould be looking like this: " " Not this: ‚ ‘ Try to replace them and see if this was the only problem. (I assume you are using Macos? Sometime it autoreplaces these, its an option you can turn off in the system settings of macos) |
||||
|
Thank you very much, Erik. Now the page works. I got some more syntax errors from the server, but thanks to your help I was able to fix them myself. - Thanks again and best regards from RocketCake newbie Sigi. |
|