How To Make Button Call A Function In The Controller

hey there. i am very new to using yii and i am having quite some complications getting used to it. i made a new php file in the views and im trying to call it using a button found in another view file. im trying to send an input using a textbox and send it to the other view file using a button, but all i get is after pressing the button, it goes back to the index/main page. this is my first yii app and most of the codes are generated by yii. any help on what should i do?

additional: i have also editted the sitecontroller.php to be able to render the new php file which contains the input it should recieve

Button Code & action Code please

the button code is pretty basic

<form name="input" method="get">

	<input type="text" name="user">

	<input type="submit" value="Submit">


and the action code that i want to be called when the button is pressed is this

	public function actionSearch()




Little bit of an update:

i found that using this line

<?php echo CHtml::submitButton('Submit', array('submit'=>'index.php?r=site/search')); ?>

in the view can create a button that will direct to the page that i want. the problem now is how do i transfer the input from the previous page to the new one

public actionSearch() {

   if(isset($_GET['name_of_text_field'])) {

      $var = $_GET['name_of_text_field'];


   // Do something with $var to get the search results you want.

   this->render('Search'); //You need to change this to pass your results to the view


ps: There is no form action in your original code, so the button doesn’t know where to send the information.