parsing values |
[eluser]miloneuss[/eluser]
Hi, i think my question would be very easy to you all, i am using CI 1.7.1, what i want to ask is how do i parsing value in href object to CI controller, i've tried and error, and still not found any way out. my code : view = Code: <div id="navcont"> controller = Code: class Cmain extends Controller { Where I am going wrong ? miloneuss
[eluser]Mushex Antaranian[/eluser]
Try at first construct your controller Code: class Cmain extends Controller { If it doesn't help, send me ( jesirobendebua@gmail ) full code of your application, I'll try to find out what is wrong..
[eluser]n0xie[/eluser]
[quote author="miloneuss" date="1241683318"]Hi, what i want to ask is how do i parsing value in href object to CI controller [/quote] Isn't it much easier to do this? Code: /**
[eluser]Mushex Antaranian[/eluser]
Ooh , sorry, I haven't notice what is in View (I think problem is in controller ) @noxie I'm doing in way you mentioned, but if @miloneuss want to do it via switch case to keep style of all souce code, try something like Code: class Cmain extends Controller { in view Code: <a href="/cmain/">Home</a> Anyway, my advice is to do it in noxie's way )
[eluser]miloneuss[/eluser]
@n0xie, thanks for reply me back. yes i can do that, but i also have to create many controller file, what i want to do is only 1 controller file for 1 view file. i'm try to put it in a condition way. @mushex, is true i can use Code: <a href="/cmain/hit/logout">Logout</a>
[eluser]Mushex Antaranian[/eluser]
Yes, you can use it, I'm not lying You can read about it more in User Guide - Passing URI Segments to your Functions |
Welcome Guest, Not a member yet? Register Sign In |