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

include
Hi I have this way of licensing my PHP application, and I want to know if you guys can answer some q

the problem with str_replace
$str="hahahahahahahahahahahahahaha";
$nn=1;
$str=str_replace('ha','MyGod',$str,$nn);

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

name=>test,age=>49

data type in column definition
Hi,
I create a table with column called "Direction of Travel code ".
The travel codes in t

Not sure why this script is not working?
Hi I am new to php programing and I was trying to make up a simple script like a captcha but I canno

explode() function problem maybe
Hi I'm having trouble searching my database. When I type two words in the search field it only searc

Help With Showing Users On the Index Page
Ive got this code which works just how i want it to.

Code: <?
$timenow=time();

Last Weeks sDate and eDate.
sDate - Start Date
eDate - End Date

I need to pull two dates for "Last Week" whi

Firewall / visited websites logger
Hi. I have a firewall implementation and I want to log all the websites visited on the machine. S

Need help adding a timestamp to my filename/variable
Hello,

I'm kind of stupid when it comes to php and I need a tiny bit of help. I've got a f

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