undefined property errors |
[eluser]iamdesign[/eluser]
Hi there, I just started of with CI and I have to say => wonderful. Although I still need some help with the basics At my labwebsite I'm trying to create a loginscript. But I keep running into undefined property errors. This is my Controller (loaded standard): Code: class Login extends Controller{ And this is my HTML form Code: <h2>Login</h2> I know that the error is there because when he loads the controller he loads the default view and there he doesn't know the validation class. But offcourse how can I overcome this error? Should I load the validation class globally? of is there a cleaner way I hope somebody can help me overcome my first CI troubles ;-) Thanks alot, Frederik
[eluser]iamdesign[/eluser]
ok i solved the problem by adding this to the index function Code: function index() allthough i don't know if this is the right way of handling this problem. can somebody get me on track thnx
[eluser]Pascal Kriete[/eluser]
You can just load checkLogin from the get-go (or move all your code to index ). It 's almost as if it gets skipped the first time, since there is no post data. It'll just load your login view.
[eluser]wiredesignz[/eluser]
This may help: http://ellislab.com/forums/viewthread/69258/ and maybe this: http://ellislab.com/forums/viewthread/69253/
[eluser]iamdesign[/eluser]
[quote author="wiredesignz" date="1201673886"]This may help: http://ellislab.com/forums/viewthread/69258/ and maybe this: http://ellislab.com/forums/viewthread/69253/[/quote] thnx it helped me bigtime :-) In the mean while I had allready a working version online, but I gonna adapt my code a bit, because I saw some better ways of doing it in your links great great! |
Welcome Guest, Not a member yet? Register Sign In |