Making a registration system - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Making a registration system (/showthread.php?tid=57040) |
Making a registration system - El Forum - 02-09-2013 [eluser]GonzaFY[/eluser] Hi guys, I started to learn CodeIgniter and it is awesome! Congratulations =). Then, I am trying to make a registration system but I am having some issues. I read that I need make a library for simplify all the code so I have: Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); Now I wanna know how can I make a function to return all session.. then I call that function from my controller and automatically, for example, I write $username into my view and I see the name of the user. I tried with this but doesn't work: Code: function Datos() { Thanks and sorry for the spanish =/ xD. Making a registration system - El Forum - 02-09-2013 [eluser]InsiteFX[/eluser] Try this: Code: function Datos() Making a registration system - El Forum - 02-09-2013 [eluser]GonzaFY[/eluser] [quote author="InsiteFX" date="1360477936"]Try this: Code: function Datos() Works perfectly! Thanks ... What is better? Make my registration system in a model or in a library? ^^! Making a registration system - El Forum - 02-10-2013 [eluser]InsiteFX[/eluser] I would make it into a library and create a model for handling the database records. This way your library can call the model methods and pass the data back to your Controller. |