≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Creating a PHP Contact Form
Posted by:
(you are not logged in)
Enter the missing letter in: "?nternational"
(you are not logged in)
Text:
[quote][b][/b] wrote: To anyone with the same problem I had. This is the solution Niko emailed me with..... [b]I took a look at it and was able to fix it. Simply remove the spaces at the beginning of each lines, somehow, those are evil for some reasons. The code should then look like this: $text = ""; foreach($_POST as $name => $value) { $text .= "$name : $value\n"; } if ($text != "") { echo 'Thanks for contacting us.'; mail("andrew@andrewandcat.co.uk", "Contact form request", $text); } I'm not entirely sure what happened there and why the spaces/tabs in your code are not liked, but removing them fixes it. Must have been some way they have been copied, maybe.[/b] I then tested Niko's solution and it worked. Perhaps the core of the problem was the way my computer copies and pastes - I used CMD + C to copy and CMD + V to paste, I work on an iMac.[/quote]
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© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact