06-18-2010, 03:08 AM
[eluser]Vasi[/eluser]
[quote author="n0xie" date="1276868158"]Why not just use GET? Makes more sense with paginating and filtering...[/quote]
I tried using POST, in my view, like this:
The problem with this is that I get the right result after two clicks on the search button, on the first click I get zero results. I know why is this happening but I can't seem to find a solution.
Thanks again for the reply and support.
Cheers!
[quote author="n0xie" date="1276868158"]Why not just use GET? Makes more sense with paginating and filtering...[/quote]
I tried using POST, in my view, like this:
Code:
if (!empty($_POST))
{
if (isset($_POST['cauta']))
{
$path = 'search/?term='.$_POST['cauta'];
if (isset($_POST['localitate']))
$path .= '&localitate;='.$_POST['localitate'];
if (isset($_POST['categorie']))
$path .= '&categorie;='.$_POST['categorie'];
}
}
The problem with this is that I get the right result after two clicks on the search button, on the first click I get zero results. I know why is this happening but I can't seem to find a solution.
Thanks again for the reply and support.
Cheers!