• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
changing / rewriting the URI

#2
[eluser]Rick Jolly[/eluser]
Something like this?
Code:
function listing($searchTerm1 = false, $searchTerm2 = false, $searchTerm3 = false)
{
   if (! empty($_POST))
   {
      $terms = '';

      if (! empty($_POST['searchTerm1']))
      {
         $terms .= '/' . urlencode($_POST['searchTerm1']);
      }
      if (! empty($_POST['searchTerm2']))
      {
         $terms .= '/' . urlencode($_POST['searchTerm2']);
      }
      if (! empty($_POST['searchTerm3']))
      {
         $terms .= '/' . urlencode($_POST['searchTerm3']);
      }
  
      $this->load->helper('url');
      redirect('info/listing' . $terms);
   }
   else
   {
      $searchTerm1 = (! empty($searchTerm1)) ? urldecode($searchTerm1) : false;
      $searchTerm2 = (! empty($searchTerm2)) ? urldecode($searchTerm2) : false;
      $searchTerm3 = (! empty($searchTerm3)) ? urldecode($searchTerm3) : false;

      // continue...
   }
}


Messages In This Thread
changing / rewriting the URI - by El Forum - 09-14-2008, 12:42 PM
changing / rewriting the URI - by El Forum - 09-14-2008, 01:46 PM
changing / rewriting the URI - by El Forum - 09-14-2008, 03:27 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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