Undefined index

Hi all. ( First of all i want to thank you for this lovely work )

I have a problem

my view file

<br>test<br>

<div class="yiiForm">

<?php echo CHtml::beginForm(); ?>

<?php echo CHtml::errorSummary($model); ?>

<div class="simple">

<?php echo CHtml::activeLabel($model,‘name’); ?>

<?php echo CHtml::activeTextField($model,‘name’); ?>

</div>

<div class="action">

<?php echo CHtml::submitButton(‘Retrieve’); ?>

</div>

<?php echo CHtml::endForm(); ?>

</div><!-- yiiForm -->

[b]

and my controller[/b]

public function actionTest()

{


	&#036;model=new TestForm;


	&#036;results=&quot;&quot;;


	


	if(isset(&#036;_POST['TestForm']))


	{


		&#036;model-&gt;attributes=&#036;_POST['TestForm'];


		&#036;name= &#036;_POST['name'];


		if(&#036;model-&gt;validate())


			&#036;results = shell_exec('/var/www/cgi-bin/test.pl' . (&#036;_POST['name']));


			


			&#036;this-&gt;redirect(array('index'));


			


	}


	





	&#036;this-&gt;renderPartial('test',array('model'=&gt;&#036;model));


}

when i post the form givin error as you can see it at bellow

what is my wrong :(

Description

Undefined index: name

00128: $name= $_POST[‘name’];

thanks for help…

Neel


$_POST['TestForm']['name']

??

check your POST with a dump


var_dump($_POST);

This time no error but not getting my result, when check the log file I see this error in the log

sh: /var/www/cgi-bin/test.pllArray: No such file or directory

shell_exec(’/var/www/cgi-bin/test.pl’ . ($_POST[‘name’]));

It should be a comma rather than a dot.

or you can do it by building a command string with spaces like:

shell_exec(’/var/www/cgi-bin/test.pl ’ . $_POST[‘name’] .’ '. $_POST[‘arg2’]);

certainly the harder way, which I was doing till recently :stuck_out_tongue: