This topic is locked

Sending E-mail from View page

1/12/2010 7:04:47 AM
PHPRunner General questions
N
Nelson author

Hi,
I'm trying to make a 'view page' where visitors could send an simple E-mail to the person that have posted the record and users could contact him/her through the view page's e-mail form:
Extra fields were made for this reason;

Name1

email1

message
and by the advice of the mod I inserted this code in the view page html mode:

<input type=button value="send email" onclick="window.location.href='Testing6_view.php?editid1={$show_key1}&send=yes';">
For the 'send' botton.
What I've got so far is this codes in the 'Events' -> View : Before Process
{

global $conn;

if (@$_REQUEST["send"])

$_REQUEST["editid1"])

$email=$values["Email"];

$subject="intressted in your ad";

$message.="Name: ".$values["Name1"]."\r";

$message.="E-mail: ".$values["email1"]."\r";

$message.="Message: ".$values["message"]."\r";

mail($email, $subject, $message);

return true;

}
And I get all kinds of errors...
I've got 2 links to help me:

There are numbers of samples on the PHPRunner forum:

http://www.asprunner.com/forums/topic/13258-importing-field-data-from-master-table/pagehlrstmpfromsearch1

http://www.asprunner.com/forums/topic/13062-include-username-in-email-before-add/pagehlrstmpfromsearch1
But I can't get my head around them...maybe I'm getting old <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=13536&image=1&table=forumtopics' class='bbc_emoticon' alt=':)' />
any help is appreciated

Nelson