How to call a method in the same class? |
[eluser]laytone[/eluser]
Is this what your wanting? Code: <?php
[eluser]laytone[/eluser]
After the page goes to the user the data that was in $data_template is gone erased poof no longer exists.... It wont be there its gone. 1. Function index() is run 2. The page is sent to the user and everything no longer exists 3. The user submits the form to function2 and everything is brand new the variables from when you ran index() no longer exists. 4. Function 2 runs and the page is sent back to the user and no longer exists. 5. The user makes another request and everything is brand new again! If you call function2 from function1 then they will both run.. but that wont do you any good. [quote author="Sinclair" date="1266367859"]Hi, I have done it, but is not working... The data_template variable have the same name in Index() and in Subscricaopasso2(). How can I call it in the correct way? Here is the code: Code: <?php Best Regards,[/quote]
[eluser]Sinclair[/eluser]
Hi, thanks for the reply. What I'm trying to do is a Multi Page Form, and I'm searching for ways of doing it. I think this way is not gonna work... There are examples of Multi Page Forms? Best Regards,
[eluser]laytone[/eluser]
Here are some threads about this: http://ellislab.com/forums/viewthread/106318/ http://ellislab.com/forums/viewthread/64258/
[eluser]Sinclair[/eluser]
Hi, thanks for the reply. I have read the posts. One thing I can't see about is the validation in multi page forms. I submit the form to the same method and then redirect to the next method or there is another way of doing the validation? Best Regards,
[eluser]Sinclair[/eluser]
Problem solved... what a newbie that I'am in OOP.. Code: <?php It is working now. Best Regards,
[eluser]laytone[/eluser]
This is the same as what I post above (#10) which is accomplished with less code and no repetition. I'm glad you figured it out! CodeIgniter is a blast! |
Welcome Guest, Not a member yet? Register Sign In |