• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Passing multiple variables on the URL

[eluser]omed habib[/eluser]
I have the following URL:


And I want to pass variables to it such as:


However, I don't want to pass them as subdirectories because if they are NOT present, the function will return an error.

How do I pass multiple variables in the URL without having to define each variable as inputs to the function and if they are not present at all the function will still work?


hm, you could parse the url with 3 or 4 lines code...

[eluser]Michael Wales[/eluser]
You could use URL segments and routing.

Route the /shoppingcart/ segment to a controller/method - then just parse out the other segments.

Honestly, this seems pretty sloppy and I would just use a session if possible.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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