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

natcasesort works on one server but not on another
Hi

I have a problem that I was hoping that someone can help me with.

I'm trying to use

Adding Outlook 2007 items via file upload
I am looking for a way to be able to attach an Outlook item (an email message) in an ASP.NET 3.5 app

Finding digits in variable containing text, and IDing them
$romanstock = "http://www.remoteprice.com/data.asp?storeid=123&itemcode=456&typ

parameter passing issue on function
Well I thought I had created a pretty slick web page, using ?page and $_GET to load pages which wher

PHP Function Page Advice
Hi All, I am quite new to PHP and Javascript but have written an Online Shop (Mainly for Fun and edu

problem getting my contact form working
Yeah I know this is a pretty basic problem, but it's been a while since I've worked with PHP and I'm

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

I need some help with the IF command...
I have a large number of images in one section of my website with the .jpg format. I'm adding a bun

Variable passed to each() is not an array or object
Hi,

This is a email a friend type of form, and it isn't working anymore.

<?

How to implement HTTP connection timeout
Hi All,I would like to implement an HTTP connection timeout.

I am working on a application wh

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