Help! Access Require to edit the database data

Guys can you help me how to change the data in the database using yii?

Currently i tried but it’s need permission.Attachment 6986 not found.

<h3>Update Data Produk</h3>

<form action="" method="post" id="myForm">

			<input type="hidden" id="id"

			value="<?php echo $dataProduk->id_produk;?>" />



			<td>Nama Produk</td>


			<td><input type="text" value="<?php echo $dataProduk->nama_produk;?>" name="nameproduk" size="50" />




			<td>Jumlah Produk</td>


			<td><input type="text" value="<?php echo $dataProduk->jumlah_produk;?>" name="jumlahproduk" size="5" />




			<td>Harga Produk</td>


			<td><input type="text" value="<?php echo $dataProduk->harga_produk;?>" name="hargaproduk" size="25" />






			<td><input id="save" type="button" value="Update" /></td>







						var id = $('#id').val();


										value : 'loading..' ,

										disable : true,


						var myFormData = $("myForm").serialize();



						url:'<php echo Yii::app()->request->baseUrl;?>/ajax/update/'+id,



						$('#data').load('<?php echo Yii::app()->request



																	value : 'Update',

																	disable : false,


						$("#form").load('<?php echo Yii::app()->request->baseUrl;?>/ajax/create');



						return false;




This is mine main.php


// uncomment the following to define a path alias

// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable

// CWebApplication properties can be configured here.

return array(


	'name'=>'My Web Application',

	// preloading 'log' component


	// autoloading model and component classes






		// uncomment the following to enable the Gii tool




			'password'=>'Enter Your Password Here',

			// If removed, Gii defaults to localhost only. Edit carefully to taste.





	// application components



			// enable cookie-based authentication



		// uncomment the following to enable URLs in path-format












		// uncomment the following to use a MySQL database



			'connectionString' => 'mysql:host=localhost;dbname=yiinigo',

			'emulatePrepare' => true,

			'tablePrefix' => '',

			'username' => 'root',

			'password' => '',

			'charset' => 'utf8',




			// use 'site/error' action to display errors








					'levels'=>'error, warning',


				// uncomment the following to show log messages on web pages









	// application-level parameters that can be accessed

	// using Yii::app()->params['paramName']


		// this is used in contact page




It’s showing error message

You forgot the question mark <?php in this line

url:’<?php echo Yii::app()->request->baseUrl;?>/ajax/update/’+id,

Oh thanks oligalma, mine mistake.


Another thing I’ve seen is that you could use the createUrl method in this line:

 url:'<?php echo Yii::app()->createUrl('ajax/update') ?>/' + id,