Sessions Value Not Saved


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

Im making a login form and im using this code:
Code: if($login=="true"){
$_SESSION['mlvl']=1;
if($username=="admin"){
$_SESSION['admin']=1;
}else{
$_SESSION['admin']=0;
}
}
but when the page refreshes their is no value on the sessions i get this output:
Array ( [mlvl] => [admin] => )

any ideas?

No comments posted yet

Your Answer:

Login to answer
148 Like 7 Dislike
Previous forums Next forums
Other forums

Posting Serialized Data Not Working
I am trying to send an object from one PHP file to another using POST. I serialize the object and th

How do I give a developer access to a specific directory and nothing else?
I want to give a develop access to a specific directory and nothing else

I can give them an F

some questions
Hello,

I am looking for the answers for following questions:

1) Does PHP support overl

Using loop to count number of entries
I'm writing a program that must ask user to type in numbers. After each entry, the program has to re

asking for direction
I have 2 tables in my data, which are "post" and "event"
I won't make a summa

Help With Showing Users On the Index Page
Ive got this code which works just how i want it to.

Code: <?
$timenow=time();

Having Problem with Date
l have a submit buttom where user have the possibility to add a date to specify when his message s

Files in current folder. Should be an easy fix.
Never mind. I've asked about this before and just found my answer. Anyway to delete this?

The repetition structure: the while statement not working
New programming student, have assignment as follows:
A restaurant has 4 lunch combos for custom

need Array help
This is what I have to do.
$teamname[1] = "Red Sox"
$teamname[2] = "Gian

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash