passing variables |
[eluser]briggl[/eluser]
I have a question that probably has a simple answer but I cannot find it in the doc. Here is the sample code from the Form Validation tuturial Code: <?php Code: $data['username'] = 'username'; Naturally, it just displays 'username' and 'email' instead of what the user (me) entered. I have tried several different ways, such as $username, username without the quotes, etc. What do I need to put in place of 'username' and 'email' to do what I want to do?
[eluser]jonyr[/eluser]
Hi Briggl, you need to pass the posted variables. Read the input class documentation in http://ellislab.com/codeigniter/user-gui...input.html Code: $data['username'] = $this->input->post('input_name'); Change input_name with the correct values.
[eluser]briggl[/eluser]
Thanks, JonyR I got it to work by using $data['username'] = set_value('username') $data['email'] = set_value('email') But now I have a follow-on question. By doing this I can pass the information to the next view, formsuccess. How do I create a global variable so that I can pass the information on to other views after that? Thanks.
|
Welcome Guest, Not a member yet? Register Sign In |