Can I pass URL variables to the index function of a controller ? |
[eluser]sirwan.me[/eluser]
Can I pass URL variables to the index function of a controller ? for example : Code: class Post extends Controller {
[eluser]suba[/eluser]
can pass variable to the index function. example: your url is www.example.com/test/45 you can get url value via two ways. 1 Code: $this->url->segment(n);// n means 1,2,3,4,etc., Code: class Test extends Controller in your view page Code: <html>
[eluser]sirwan.me[/eluser]
hi suba when i do your second method it doesnt work.. it doesnt seem to allow it when i pass variables to the index function of a controller, but works with all the other functinos on in the controller |
Welcome Guest, Not a member yet? Register Sign In |