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

split values
I have values that are returned to me in this format:

name=>test,age=>49

need good snippet manager
Hi. as i am coding and learning more, it is becoming difficult to manage code snippets. how you mana

get multiple rows
Hi I want to get multiple rows from a db

I am using this for the db query
Code: public

problem with refreshing
in my site, i have an index page, it has a main div. this main div's content is changing according t

some questions
Hello,

I am looking for the answers for following questions:

1) Does PHP support overl

Inserting a check in checkbox from array value
Hello all,
I have a bit of code that works for a select option box, but does not work for my chec

utf8_general_ci error ??
I have all kinds of data to be inserted in database table

//I am getting this error

Yo

PHP - MySQL Fail
My PHP code will only execute the first part of my code...

Code: <?php

sessio

Extending Exception to contain method name
I was wondering, if there's a way to extend Exception in such a way, that it would contain name of a

Blogging s/w
heya frndz!!! i want to start a blog.... m looking for a s/w like oscommerce which is thr for e-comm

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