Why i need to put evrything in a index function |
[eluser]Achmed1[/eluser]
Hi all. I got a question i want to build example a blog or something. Why i can't example put it in a order of functions example one functions validates the form one functions add something to the database. Why i need always to put evrything in a index function is it not possible to do something like this example in order. Code: <?php
[eluser]darrentaytay[/eluser]
You can make as many functions as you like and call them using: Code: $this->validate(); etc.
[eluser]Achmed1[/eluser]
[quote author="darrentaytay" date="1306003957"]You can make as many functions as you like and call them using: Code: $this->validate(); etc.[/quote] Thanks for the info, But example i got a form with <?php echo form_open('index.php/register/validation'); ?> i need to put all the fucntions in the validation function ?
[eluser]4ever[/eluser]
You can call a function hello by example c:/localhost/ci/site/hello or index function in class site: c:/localhost/ci/site
[eluser]ramm[/eluser]
[quote author="Achmed1" date="1306004746"]Thanks for the info, But example i got a form with <?php echo form_open('index.php/register/validation'); ?> i need to put all the fucntions in the validation function ?[/quote] Yes, for that example you will have a controller called "register.php" with a function called "validation". It is everything here: http://ellislab.com/codeigniter/user-guide/ |
Welcome Guest, Not a member yet? Register Sign In |