divadiva Posted November 21, 2008 Share Posted November 21, 2008 I am trying to set a value of dbsup to SESSION value .Earlier it was being set to database username. This is what my code was before $globvars['dbsup'] = 'database name'; I replace teh baove one with this: $globvars['dbsup'] = $_SESSION['username']; But, now I get this as an Notice: Undefined index: username in /var/www/html/.. on line 28.Any sugegstions? Link to comment https://forums.phpfreaks.com/topic/133652-solved-how-to-get-rid-of-index-notcie/ Share on other sites More sharing options...
Mark Baker Posted November 21, 2008 Share Posted November 21, 2008 It means there is no value for username in your session. Ensure you're doing a session_start() before trying to access session values Link to comment https://forums.phpfreaks.com/topic/133652-solved-how-to-get-rid-of-index-notcie/#findComment-695357 Share on other sites More sharing options...
divadiva Posted November 21, 2008 Author Share Posted November 21, 2008 I do have session_start.When I print username ,I get a value for username as well.I tried putting error_reporting(5); now that problem has been sorted. Thanks for replying. Link to comment https://forums.phpfreaks.com/topic/133652-solved-how-to-get-rid-of-index-notcie/#findComment-695364 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.