[eluser]mhulse[/eluser]
Hi,
I was hoping I could get some feedback from the pros... I am looking for advice on "best practice" for setting a URL.
Long story short, my app will allow users to "bookmark" their creations. Currently, the best way I can think of passing data to the "bookmark" controller/method is to do this:
Code:
/application/controller/bookmark/a1a1a1,a2a2a2,b1b1b1,b2b2b2,c1c1c1,c2c2c2...
As you can see, the method argument could get kinda long and squirrely.
On the flip side, the above seems to make the most sense in terms of handling an unknown number of possible method arguments.
The only other alternative I could think of would be to do something like this:
Code:
/application/controller/bookmark/a1a1a1,a2a2a2/b1b1b1,b2b2b2/c1c1c1,c2c2c2/...
... Hmmm, that seems kinda funky. In fact, I am not even sure if it is possible to pass an unknown number of args to a CI controller method (which would probably be unsafe practice anyway).
Just hoping the pro CI devs can help me figure out the best way to handle this situation.
Should I encode the argument before passing it to my bookmark method (and then decode via the bookmark method/view)? If so, what PHP encoding method would you use?
Any tips ya'll could provide would be greatly appreciated!
Thanks so much!
Cheers,
Micky