basic stuff passing vars from controller to view |
[eluser]alebenson[/eluser]
i have this view file: admin_view.php Code: <html><head><title>Admin</title></head> the h2 shows the error from the validation library the h3 is for another kind of errors that I want to show so one of the controllers (admin.php) have this function Code: function perfil() if you try to enter the /admin/perfil/ and you are not logged this thing send you to the form... and i want to show that text, but i dont know why it doesnt work!! i know this is basic stuff i read the load->view user guide and copy paste the code there and works fine, but here it seem not to work
[eluser]tonanbarbarian[/eluser]
you cannot pass data via the redirect redirect sends a response back to the users browser tell it to go to a different page. you should pass data to a view to display it
[eluser]alebenson[/eluser]
yes.. woking now... but 2 things going wrong so first the URI shows as admin/perfil/ , does not update to just admin/, because of the view and not on the redirect and <?=$this->validation->usuario;?> from the admin_view.php show me an error because im not passing anything i guess the question i have to ask is diferente the thing i want to do here is that if someone try to get admin/perfil and is not logged the funcion send it to the admin/ with an error message but im thinkg of giving up on the error message and use the redirect what do you suggest?
[eluser]tonanbarbarian[/eluser]
I am not sure what you are saying the issue is but i recommend you sit down and read the User Guide all the way through and also maybe view the tutorial videos as well |
Welcome Guest, Not a member yet? Register Sign In |