Yii Mvc

Hi i am a Yii newbie and got this simple submit form

<form action="chunkify.php" method="POST">

  Enter a word: &lt;input type=&quot;text&quot; name=&quot;word&quot; /&gt;&lt;br /&gt;


  How long should the chunks be? &lt;input type=&quot;text&quot; name=&quot;number&quot; /&gt;&lt;br /&gt; 


  &lt;input type=&quot;submit&quot; value=&quot;Chunkify&#33;&quot;&gt; 


&lt;/form&gt;





and chunkify.php

<?php

$word = $_POST[‘word’];

$number = $_POST[‘number’];

$chunks = ceil(strlen($word)/$number);

echo “The $number-letter chunks of ‘$word’ are:<br />\n”;

for ($i=0; $i < $chunks; $i++) {

$chunk = substr($word, $i*3, 3);

printf("%d: %s<br />\n", $i+1, $chunk);

}

?>

It works but i tried to separate this code into Yii MVC and it does not work.

I used Yii 's controller generator and it generates a controller and a view

In the view , i create the submit form

&lt;form action=&quot;chunkify.php&quot; method=&quot;POST&quot;&gt; 


  Enter a word: &lt;input type=&quot;text&quot; name=&quot;word&quot; /&gt;&lt;br /&gt;


  How long should the chunks be? &lt;input type=&quot;text&quot; name=&quot;number&quot; /&gt;&lt;br /&gt; 


  &lt;input type=&quot;submit&quot; value=&quot;Chunkify&#33;&quot;&gt; 


&lt;/form&gt;

In the controller

public function actionCut()


{


   &#036;word = &#036;_POST['word'] // this line does not work


   &#036;this-&gt;render('cut');


}





I can not get the value with _POST. Thank you for your help.

cjeck this out

please read how run MVC pattern On YII carefully YII easy than others …

http://channasmcs.byethost7.com/