![]() |
Need some help - 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: Need some help (/showthread.php?tid=5093) |
Need some help - El Forum - 01-05-2008 [eluser]Unknown[/eluser] hi, i have no idea why this controller isn't working as I expected :gulp: it s a simple class with an attribute and 4 methods: set(), get(), index (), and the constructor. Code: <?php The view is: Code: <html> Once both of the links from the view are clicked, I was expecting to be displayed Quote:a="Value", but instead of this, i get for the "a" attribute the same value as it was at the begining. It's the first time i'm using php classes, so I must be very wrong about smth.. Anyway, the reason I'm testing this is because I only need a way to transmit a parameter from one function to another inside a controller (can t be that hard ;-P !!!), maybe a global variable? Thx in advance Need some help - El Forum - 01-05-2008 [eluser]Craig A Rodway[/eluser] If you need to store data in that way (between requests) you will need to use sessions. Your current method is not working because the variable only lasts for each request that you make to /text/set. Also, your first anchor doesn't go to /text/set - just /text/. Need some help - El Forum - 01-06-2008 [eluser]Unknown[/eluser] Thanks, it worked with sessions ![]() |