Can anybody tell me how to send some value through
response.redirect
I am making search funtion and that is called admin_search() from
there when user enters some value then form will redirected to
admin_index function where my search query is working.
function admin_search() {
$this->_adminOnly();
}
function admin_index() {
$this->_adminOnly();
$_SESSION['lastsort'] = $_SERVER['REQUEST_URI'];
if (! empty ($this->data)) {
$Querystring= trim($this->data['Agent']['search']);
$this->paginate['fields'] = array
('id','uid','agent','vendor','model','totalhits');
$this->paginate['limit'] = 50;
$this->Agent->recursive = 0;
$this->set('agents', $this->paginate(array(array('verified' =>
0,'or'=>'Agent.agent' like "%$Querystring%"))));
}
}
In this case my form is posted on admin_index
But what i wan't is that i want to post my form to admin_search and
then from there i wan' t to send search string value to admin index
page so cananybody tell me how to perfor this task this is very
urgent.
and also can anybody tell me whether this is the write way to send
value to other function
$this->redirect(array('action'=>'admin_index'),$Querystring);
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment