![]() |
Procedural PHP and $_SESSION issue - 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: Procedural PHP and $_SESSION issue (/showthread.php?tid=12792) |
Procedural PHP and $_SESSION issue - El Forum - 10-31-2008 [eluser]Bramme[/eluser] Hey all, I've been asked to code a backend for a website. However, they need some things online as fast as possible and seeing as the whole page is in pure html for the moment, I decided to whip up some quick PHP pages while I work on the backend. However, I've hit a snag: there's an order form on the website that I want to validate at least a little. But I'm having a problem with repopulating the fields... Here's my code: order page: Code: <?php My orderconfirmation page looks like this: Code: <?php I thought that this would repopulate the fields as $_SESSION should be accessible across both pages. However, the moment I use the header() function to redirect to the previous page, my session array is unset ![]() Procedural PHP and $_SESSION issue - El Forum - 10-31-2008 [eluser]Bramme[/eluser] Okay nevermind, just noticed a stupid mistake in my echosession function. It's fixed now and works perfectly. I had a typo in my print_r too, so that's why I thought the session was being unset. Silly me! |