blob: b6ce575ec3f5069ed01fa35c6fc0cbf4b70efcdd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<?php
class Contact extends TPage
{
/**
* Event handler for the OnClick event of the submit button.
* @param TButton the button triggering the event
* @param TEventParameter event parameter (null here)
*/
public function submitButtonClicked($sender, $param)
{
if ($this->IsValid) // check if input validation is successful
{
// obtain the user name, email, feedback from the textboxes
$name = $this->Name->Text;
$email = $this->Email->Text;
$feedback = $this->Feedback->Text;
// send an email to administrator with the above information
$this->mailFeedback($name, $email, $feedback);
}
}
protected function mailFeedback($name, $email, $feedback)
{
// implementation of sending the feedback email
}
}
?>
|