My issue is when i set on main.php to set ‘showScriptName’=>false,
The $_GET don’t work anymore. But if I not. It does work fine. Any ideas about this?
Controller part:
if(isset($_GET['keyword'])){
$criteria->addSearchCondition('field', $_GET['keyword'], true, 'AND');
}
if(isset($_GET['keyword2']) && !empty($_GET['keyword2'])){
$criteria->addSearchCondition('field2', $_GET['location'], true, 'AND');
}
$total_count = Table::model()->count($criteria);
$result = Table::model()->findAll($criteria);
$pages = new CPagination($total_count);
$pages->pageSize=$page_count;
$pages->applyLimit($criteria);
$dataProvider = new CArrayDataProvider($result,array('pagination'=>array('pageSize'=>$page_count)));
$this->render('search',array(
'jobs'=>$dataProvider->getData(),
'dataProvider'=>$dataProvider,
'pages'=>$pages,
'itemCount'=>$total_count,
));
The path after it submit isl ike this: local.host/search/?keyword=data&keyword2=data2
But when I print_r the $_GET parameters it does not fetch anything.
Any idea?