Simple Contact Form Failure? |
||
Welcome to the Zymic webmaster forums. Our forums are here to provide people the free ability to discuss a range of websites related topics such as design, development coding and marketing.
In order to post you will need to register for a zymic account or if you already have one simply login by using the form on the left.
Zymic Webmaster Forums Web Design & Development Server Side Scripting PHP |
||
![]() |
Simple Contact Form Failure? |
||
Dec 16 2009, 02:06 PM
Post
#1
|
|
|
Newbie ![]() Group: Members Posts: 3 Joined: 12-December 09 Member No.: 122,342 |
Hello. I've created a website for a friend and I'm trying to add a contact form in php where people type in comments and click submit, and it emails to my friends email. But whenever I test it out, I get the following error:
Data has been submitted to bobshinglesband@gmail.com! Warning: mail() [function.mail]: Mail() functionality if not on by default; please purchase this option by contacting zymic.com in /www/zxq.net/b/o/b/bobshinglesband/htdocs/mailer.php on line 14 mailer.php: CODE <?php if(isset($_POST['submit'])) { $to = "bobshinglesband@gmail.com"; $subject = "bob shingles band email!!"; $name_field = $_POST['name']; $email_field = $_POST['email']; $message = $_POST['message']; $body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message"; echo "Data has been submitted to $to!"; mail($to, $subject, $body); } else { echo "blarg!"; } ?> contact.php: CODE <center><form method="post" action="mailer.php"> Name: <input type="text" name="name" size="19" /><br /> <br /> Email: <input type="text" name="email" size="19" /><br /> <br /> <textarea rows="9" name="message" cols="30"></textarea> <br /> <br /> <input type="submit" value="Submit" name="submit" /> </form></center> Anyone know what the problem is?? Thanks |
|
|
Dec 16 2009, 06:05 PM
Post
#2
|
|
![]() Outrageously Uber Ninja ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Administrators Posts: 2,831 Joined: 11-March 07 From: UK Member No.: 9 |
The error really says it all:
CODE Mail() functionality if not on by default; please purchase this option by contacting zymic.com We offer mail() functionality for a one off $10 charge, pop onto http://livechat.zymic.com and we can give you further instructions. |
|
|
Dec 16 2009, 08:26 PM
Post
#3
|
|
|
Newbie ![]() Group: Members Posts: 3 Joined: 12-December 09 Member No.: 122,342 |
It's not really worth ten dollars... I can still use smtp for free can't I?
|
|
|
Dec 16 2009, 11:33 PM
Post
#4
|
|
|
Outrageously Uber Ninja ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 1,805 Joined: 10-July 08 From: UK Member No.: 44,994 |
No, we don't allow outside connections as it causes too much phishing activity and spam.
Swordz |
|
|
![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users) |
||
| 0 Members: | ||
Forum Jump |
||
| Lo-Fi Version | Time is now: 23rd May 2013 - 04:39 PM |