hi how to write this in yii

<form method="post">

Name: <input type="text" name="fname"><br>

Age: <input type="text" name="age"><br>

<input type="submit">


<?php echo $_POST["fname"]; ?><br>

<?php echo $_POST["age"]; ?>



check these

thanks but how can i create a name of the form

In fact, the name of the form is useless.

All the inputs have the nessesary data,

for example the above code

echo $form->textField($model,'nameattribute');

generates something like that

<input name='nameofthemodel[nameattribute]' />

so after of submit you can check if the form is submitted by

if (isset($_POST['nameofthemodel']))...

if you want to set name of the form for other purpose (for example jquery) then you could test this

$form=$this->beginWidget('CActiveForm', array(