Welcome Guest, Not a member yet? Register   Sign In
Session best practice question
#1

[eluser]maadmac[/eluser]
How do you normally direct logged in users? My initial inclination would be something like this:

Code:
<?php if ($this->session->userdata['logged_in'] == true) redirect('/somewhere'); ?>

at the top of each page. But I'm running into a 'headers sent' issue, and so I'm wondering if I should try to address it via ob_flush or move the code somewhere else on the page, so the headers get sent first, or something else? Any tips are appreciated, thanks.


Messages In This Thread
Session best practice question - by El Forum - 10-26-2007, 10:24 AM
Session best practice question - by El Forum - 10-26-2007, 11:41 AM
Session best practice question - by El Forum - 10-26-2007, 12:33 PM
Session best practice question - by El Forum - 10-26-2007, 12:46 PM
Session best practice question - by El Forum - 10-26-2007, 01:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB