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

need to apply an if/else statement to Tim Thumb script
Not sure how to work this. I essentially want to call a variety of image sizes based on which style

Exporting new records
Trying to figure out the best way to set this up.

People register my site.

Their prof

PHP5 - AJAX help
I've been following the tutorial on w2schools (http://www.w3schools.com/php/php_ajax_database.asp) a

PHP and Javascript
Hi Guys,

Im trying to load the contents of an html file into a text area for editing, this is

returning data from an ssh2_exec()
here's what i got.


$conn = ssh2_connect($this->_host);
ssh2_auth_password($c

help with multi-update
Now sure how to ask this really....
10g database if that matters.

I have a customer

Month String to Numeric?
Hi guys,

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

What makes a script your own?
If someone finds a login script online, and changes some variable names around and some other minor

SMTP server...
I recently found a tutorial online on SMTP authentification for sending emails from webpages, here i

Php - mysql select?
hi, i have this code:

Code: <?php
session_start();
// dBase file
include &quo

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