blob: f080e78c8975af2303276f341ba8e2ef6206cfcb (
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
|
<?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
}
}
|