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

Form validation with functions
Hi there

I am trying to make a very simple form validation function. I currently have the fol

weeks in a year
hi,

i found this snippet on php.net
QuoteFor the week number for weeks starting on Sunday:

TemplatePower & AJAX
Hi all,



I'm currently implementing some AJAX features in my PHP-framework (which is b

Concatenate two strings ???
I have string one $string1 and another $string2.

How to concatenate (add) both of them $str

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

mr8m - reverse document
Friends,

I'm trying to reverse a document held by MIRO, but it reports the message balan

Give me all your tricks for minimizing jar file size

Hi, I'm coming close to releasing my J2ME game... I am kicking up against the 64k size barrier w

What are the two different files you download to update kernel?
What are the two different files you download to update kernel?

PHP page is blank
Hi Everyone,

I have a site in which I am able to open the first PHP webpage in my browser but

extract data
Code: <div class="post hentry uncustomized-post-template">

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