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"){
Did you know?Explore Trending and Topic pages for more stories like this.
$_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

Gaining access to Drop Down Menu Variable
code is below, I am creating a drop down menu. I want to echo the value selected in the drop down me

Displaying an image using echo command
I had done a query on my database, one of the fields being an image reference to a directory where a

Add 5 to a variable when a button is clicked, and re-run a for loop
So I'm making a feedback sort of section on a website with MySQL and PHP, I've gotten the script to

What do you call the "token" thing?
You know how some sites have links that run on tokens? Tokens are links that only stay alive for a c

fire away
i launched about 4 months ago as a lagit co. i have 2 paying clients, 1probono, 1 side progect, and

Count on multidimensional array
Hi, i got an array as below:

Array
(
=> Array
(

switch form actions? not working
i want on submit to go to different pages according to the CatID

Code: <?php $CatID=$_

Retrieving Data from Two Different Databases
Hello All,

Ran into another problem and would appreciate some help! I have two datab

array_count_values question?
ok i'm trying to create a top ten list from a database of listed favorite movies.

the followi

Read from a text file after a specific word
Hi all.

I have a text file that looks like the one below.
I know how to open the text fi

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