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

Multidimensional Array into an Html table, help!
Hello all, I am new to HTML/PHP so any help would be great.

I have a multidimensional array f

User registration and login
I don't know whether this is the correct forum, if not i apologise but am pretty desperate at the mo

Progress bar tracking file downloads
Hey guys, was wondering if there was a way to track how far a file has been downloaded. I know there

Help pulling in 'id' with "read more" link
I'm trying to create snippets of my articles in the cms I'm creating, and then have them redirect to

Month String to Numeric?
Hi guys,

Given a month as a string, is there a simple way to find the numeric representation

PHP url branch??
Functionally, using PHP, I'm doing a test of login input submitted by a user via an html form in a f

defining website tags
Hi,

What would be the best way to define tags for my site, such as website title, url etc.

Solution Manager BPR
Does the SolMan-BPR-ARIS-Integration (http://www.ids-scheer.com/en/ARIS/ARIS_Platform/ARIS_Business_

Need help with a mail notify function
I was tasked with setting up a site that's been prewritten. The site is basically a form that captur

Operator precedence assistance.
I did a quick Google search and couldn't quite find the answer I wanted in terms I could understand,

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