trying image upload???

i have table in Mysql tbl_image(id(int) , ,image(varchar))

created model and crude for it .

trying to upload an image in a location D:\xampp\htdocs\wikiwin\images from another location

on browser navigating to http://localhost/wik...image/view&id=1

it gives me browse option but how to upload at location after giving image path ----"or how it will upload…No button is there for this".

for this i tried like that:

In Model file--------------

public function rules()


		// NOTE: you should only define rules for those attributes that

		// will receive user inputs.

		return array(

			array('image', 'required'),

			array('image', 'length', 'max'=>300),

			// The following rule is used by search().

			// Please remove those attributes that should not be searched.

			array('ID, image', 'safe', 'on'=>'search'),

			array('image', 'file', 'types'=>'jpg, gif, png'),


in controller file----------------

public function actionCreate()


	$model=new Image;

	// Uncomment the following line if AJAX validation is needed

	// $this->performAjaxValidation($model);






		$model->image->saveAs(Yii::app()->basePath . '/D:\xampp\htdocs\wikiwin\images' . $model->image);







in correspondig view.php file--------



<?php echo CHtml::form(’’,‘post’,array(‘enctype’=>‘multipart/form-data’)); ?>

<?php echo CHtml::activeFileField($model, ‘image’); ?>

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

Is your submit button just commented out?

If not, make sure you add:

<?php echo CHtml::submitButton('Submit'); ?>

before closing out your form.