EliteConf
 All Data Structures Namespaces Files Functions Variables Pages
SendmessagefunctionController.php
Go to the documentation of this file.
1 <?php
2 
9 {
10  public function actionIndex()
11  {
12  $this->render('index');
13  }
14 
19  public function sendmessage()
20  {
22 
23  $senderid = $_POST['senderid'];
24  $receiverid = $_POST['receiverid'];
25  $content = $_POST['message'];
26 
27  $sql_insert_message="INSERT INTO message ( senderid, receiverid, content)
28 VALUES
29 ('$senderid', '$receiverid', '$content')";
30 mysql_query($sql_insert_message) or die (mysql_error());
31 
32 
33 
34  }
35 
36  // Uncomment the following methods and override them if needed
37  /*
38  public function filters()
39  {
40  // return the filter configuration for this controller, e.g.:
41  return array(
42  'inlineFilterName',
43  array(
44  'class'=>'path.to.FilterClass',
45  'propertyName'=>'propertyValue',
46  ),
47  );
48  }
49 
50  public function actions()
51  {
52  // return external action classes, e.g.:
53  return array(
54  'action1'=>'path.to.ActionClass',
55  'action2'=>array(
56  'class'=>'path.to.AnotherActionClass',
57  'propertyName'=>'propertyValue',
58  ),
59  );
60  }
61  */
62 }