Welcome Guest, Not a member yet? Register   Sign In
Using GET values
#1

[eluser]Unknown[/eluser]
Hello,

One client of mine had a site created a while ago. The site utilized CodeIgniter but was also a bad hybrid of Dreamweaver so the client needs it redone. We are slowly moving away from CodeIgniter as we are developing our own framework but at the moment we have a problem with using $_GET variables. Our paths look like this: /index.php?welcome/links
We added a new "view" videos, so it's /index.php?welcome/videos but we now need to create inside pages so to view single videos. We wanted to use $_GET variables like
/index.php?welcome/videos&id=21&view=fullscreen but CodeIgniter prohibits that url format (The URI you submitted has disallowed characters.).
We next tried: /index.php?welcome/videos/id/21/view/fullscreen/ or /index.php?welcome/videos/0/id/21/view/fullscreen/ but it doesn't work as well. $_GET['id'] doesn't return any value.
#2

[eluser]n0xie[/eluser]
http://www.askaboutphp.com/58/codeignite...rings.html
#3

[eluser]Unknown[/eluser]
1st method doesn't work. The site navigation breaks.

In the second method, I don't understand what to change here:

Quote:and then you can add this line to your controller’s contructor method:

parse_str($_SERVER['QUERY_STRING'],$_GET);

So if you do a test now, only the controller with the above line of code will be able to accept mixed segment and querystring URLs.
#4

[eluser]devastator[/eluser]
see this topic i think can help you

http://ellislab.com/forums/viewthread/145583/




Theme © iAndrew 2016 - Forum software by © MyBB