php? contact form?
Nick Holland <[email protected]> Tue, 19 Jul 2011 16:41:15 +0100
| Newsgroups | gmane.comp.cms.lenya.user |
|---|---|
| Message-ID | <1311090075.3112.5.camel@WTUK100Developer> |
how do i intergrate a serverside php scripting to make a simple contact
form in lenya?
<?php
//declare our assets
$name = stripcslashes($_POST['name']);
$emailAddr = stripcslashes($_POST['email']);
$comment = stripcslashes($_POST['message']);
$subject = stripcslashes($_POST['subject']);
$contactMessage =
"Message:
$comment
Name: $name
E-mail: $emailAddr
Sending IP:$_SERVER[REMOTE_ADDR]
Sending Script: $_SERVER[HTTP_HOST]$_SERVER[PHP_SELF]";
//send the email
mail('[email protected]', $subject, $contactMessage);
echo('success'); //return success callback
?>
this is the code im using, but if i try and call it, I get an error.
I simply do not understand why this script which works every other time
ive used it fails on lenya