How pass GET value in a URL? |
[eluser]napster3000[/eluser]
I tried to pass a GET value in a url but i get error /frontend.php/Booking/?id_build=74 I've to get id_build value passed by url.
[eluser]eoinmcg[/eluser]
If you have query strings enabled you should be able to access them via URI segments http://ellislab.com/codeigniter/user-gui.../urls.html Otherwise, try accessing via the $_REQUEST superglobal http://us2.php.net/manual/en/reserved.va...equest.php
[eluser]eoinmcg[/eluser]
@enjoyfrancis This won't work out of the box. Codeigniter's default behaviour is to empty the $_GET array
[eluser]therealmaloy[/eluser]
@napster3000 one of the best ways to do it is using segments as pointed out by eoinmcg. try to minimize the use of the traditional value pair method in the URLs but instead utilize the functionality provided by CI. this method is very handy and will make your URLs a little bit cleaner and clearer...
[eluser]napster3000[/eluser]
i used $this->uri->segment(3) but when after i submit a form the value of $this->uri->segment(3) return "css"! how?? i think it's for this html header <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" /> <link rel="stylesheet" href="css/print.css" type="text/css" media="print" /> <link rel="stylesheet" href="css/table.css" type="text/css" media="screen" /> <link rel="stylesheet" href="css/calendar.css" /> but why??
[eluser]therealmaloy[/eluser]
@napster3000 post your controller and view, let's try to dissect your problem... |
Welcome Guest, Not a member yet? Register Sign In |