|
-
Feb 12th, 2013, 07:37 PM
#11
Re: login problem
 Originally Posted by MonkOFox
Looking at what code you provided for login.php, you didn't call session_start(). You have to call this on every page that you intend to set or retrieve $_SESSION variables.
Otherwise, if you're getting redirected (meaning your login was successful), $_SESSION['user'] and ['userid'] should work.
I thought the same thing too... but it's in top.php...
 Originally Posted by Jamie_Garland
hello,
at the top of the top.php page i have
<?php
session_start();
$username = $_SESSION['username'];
$userid = $_SESSION['userid'];
?>
if all pages include top.php, then the session should be started, and he's able to read the session data...
-tg
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|