Welcome Guest, Not a member yet? Register   Sign In
New user URI problems
#1

[eluser]Unknown[/eluser]
Hello, I just started using code igniter (and object oriented php), and I'm trying to make a simple login system as an exercise. I want to be able to login at a url like: domain.com/login/ -or- domain.com/login/redirect/admin/ where the user is redirected to the admin page after they login. So that's the goal, here's where I'm having problems that I don't know how to approach:

I want a function that handles the login stuff to be called in both the index() and redirect() functions. That way I don't have to repeat code between the two. But making a function outside of that (named loginform()) doesn't seem to work as it can't find the function when I call it. This might not even be the best way to accomplish what I want, so I was hoping someone would have a good idea of how to approach this.




Theme © iAndrew 2016 - Forum software by © MyBB