Search & Pagination

#8
[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:

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!


Messages In This Thread
Search & Pagination - by El Forum - 06-17-2010, 08:59 AM
Search & Pagination - by El Forum - 06-17-2010, 09:13 AM
Search & Pagination - by El Forum - 06-17-2010, 10:04 AM
Search & Pagination - by El Forum - 06-17-2010, 11:01 AM
Search & Pagination - by El Forum - 06-17-2010, 02:48 PM
Search & Pagination - by El Forum - 06-18-2010, 01:34 AM
Search & Pagination - by El Forum - 06-18-2010, 02:35 AM
Search & Pagination - by El Forum - 06-18-2010, 03:08 AM
Search & Pagination - by El Forum - 06-18-2010, 06:52 AM
Search & Pagination - by El Forum - 06-19-2010, 04:14 PM
Search & Pagination - by El Forum - 06-20-2010, 07:35 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.