Fredrik Tillman wrote:
PROBLEM SOLVED!
What I actually was including was a variable ($main) and since some my
pages are called on from different pages in different folders what I
actually did was seting $main to the full URL to the site
(http://mysite.com/page.php) to avoid confusion. But whe
Fredrik Tillman wrote:
PROBLEM SOLVED!
yeah! :-)
What I actually was including was a variable ($main) and since some my
pages are called on from different pages in different folders what I
actually did was seting $main to the full URL to the site
(http://mysite.com/page.php) to avoid confus
On 2/8/06, Fredrik Tillman <[EMAIL PROTECTED]> wrote:
> Ok here are some code:
> /* Check User Script */
> session_start(); // Start Session
>
> include 'db.php';
> // Convert to simple variables
> $username = $_POST['username'];
> $password = $_POST['password'];
>
> if((!$username) || (!$passwo
PROBLEM SOLVED!
What I actually was including was a variable ($main) and since some my
pages are called on from different pages in different folders what I
actually did was seting $main to the full URL to the site
(http://mysite.com/page.php) to avoid confusion. But when calling on a
URL I gu
your problem is probably the fact that when you include
page.php you are in effect calling session_start() twice -
no idea what that does to your session but I wouldn't be
suprised if that borked the _SESSION array.
TIP: create a 'global include file' that contains all the code
required by every
Fredrik Tillman wrote:
IN PAGE.PHP
[More code here]
Hit me if i am wrong, but doesn't it start a new session here?
Would you mind removing the session_start() from that file and test it
again?
btw please try what i mentioned earlier. it's easier to locate the
problem. Thanks.
Barry
--
ok.. I was a little too fast again when explaining my problem.. Gonna
put some code up for you to see...
First of all I DO use quotes. I tried both single and double ones (',")
Ok here are some code:
IN LOGINSCRIPT:
";
include 'index.htm';
exit();
}
// Convert password to md5 hash
$pass
Fredrik Tillman wrote:
ok.. Let me explain the problem better.
'user_level' is set by a login script. It seems to be working fine since
I can make things like:
if ("1"==$_SESSION[user_level]) { let this stuff happen }
$_SESSION[user_level] is wrong unless 'user_level' is a defined constant
Fredrik Tillman wrote:
ok.. Let me explain the problem better.
'user_level' is set by a login script. It seems to be working fine since
I can make things like:
if ("1"==$_SESSION[user_level]) { let this stuff happen }
on my mainpage.
on that same mainpage I use
include ("page.php");
(I also
ok.. Let me explain the problem better.
'user_level' is set by a login script. It seems to be working fine since
I can make things like:
if ("1"==$_SESSION[user_level]) { let this stuff happen }
on my mainpage.
on that same mainpage I use
include ("page.php");
(I also tried require...)
If I
10 matches
Mail list logo