You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Nick Holland <nh...@googlemail.com> on 2011/07/19 17:23:33 UTC
anothing frustrating error
this may seem easy for all you developers but i am having great
difficulty putting a simple contact form in my web pages through 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('myemail@myemail.com', $subject, $contactMessage);
echo('success'); //return success callback
?>
this is the code im using, but lenya doesnt like it
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: anothing frustrating error
Posted by Vik Tara <vi...@propco.co.uk>.
You might also want to look at lenya's contact form module:
http://lenya.apache.org/docu20/standardmodules/contactformmodulesection/contactformmoduleoverview.html#N1000F
But I have not used it and the docu seems a bit thin.
On 07/19/2011 04:30 PM, Vik Tara wrote:
> What error do you get?
>
> That looks like php code to me - but lenya will expect xhtml.
>
> On 07/19/2011 04:23 PM, Nick Holland wrote:
>
>> this may seem easy for all you developers but i am having great
>> difficulty putting a simple contact form in my web pages through 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('myemail@myemail.com', $subject, $contactMessage);
>> echo('success'); //return success callback
>> ?>
>>
>>
>> this is the code im using, but lenya doesnt like it
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>> For additional commands, e-mail: user-help@lenya.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: anothing frustrating error
Posted by Vik Tara <vi...@propco.co.uk>.
What error do you get?
That looks like php code to me - but lenya will expect xhtml.
On 07/19/2011 04:23 PM, Nick Holland wrote:
> this may seem easy for all you developers but i am having great
> difficulty putting a simple contact form in my web pages through 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('myemail@myemail.com', $subject, $contactMessage);
> echo('success'); //return success callback
> ?>
>
>
> this is the code im using, but lenya doesnt like it
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org