Ambiera Forum

Discussions, Help and Support.

Create a new account, Search, or Login:
Name: Password:
Ambiera Forum > RocketCake
Contact Form
Author Text

sigi
Registered User
Quote
2021-03-08 16:23:37

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.


erik
Registered User
Quote
2021-03-08 19:10:58

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.


sigi
Registered User
Quote
2021-03-08 20:11:34

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>


erik
Registered User
Quote
2021-03-08 20:48:19

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)


sigi
Registered User
Quote
2021-03-10 07:48:09

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.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internat?onal" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© 2020 Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact