 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
Marius
Joined: 25 Apr 2007 Posts: 15 Location: Jhb, South Africa
|
Posted: Sun Oct 07, 2007 1:48 am PHP Form Code |
|
|
|
Hi i have a form with the following elements:
Name
Email
Phone
Comments
The following script is what i am trying to use but there is a mistake somewhere, could you please check where i went wrong:
| Code: |
<?php
$name = $_POST['Name'];
$email = $_POST['EmailAddress'];
$phone = $_POST['Phone'];
$message = $_POST['Comments'];
$formcontent="Name: $name\n\nComments: $phone: $message";
$recipient = "xxxatgmail.com";
$subject = "Online Form";
$mailheader = "From: $email\r\n";
$mailheader .= "Reply-To: $email\r\n";
$mailheader .= "MIME-Version: 1.0\r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Failure!");
header ( "Location: http://www.domain.co.za/contact.html" );
?> |
|
|
Pattons3rd

Joined: 28 Dec 2006 Posts: 1212 Location: Colorado
|
Posted: Sun Oct 07, 2007 6:06 am |
|
|
|
Does your host support SMTP?
That is the usual problem. |
|
Marius
Joined: 25 Apr 2007 Posts: 15 Location: Jhb, South Africa
|
Posted: Sun Oct 07, 2007 7:45 am |
|
|
|
| aah, just phoned them...i need to upgrade the package to support PHP |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|
|