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

problem with GROUP BY and ORDER BY
i usually use this query to display the last 10 entries from a sql table:

Code: $query = &quo

Validation
Hello

I know this is a really vag question.

I need to have a input field on a form th

Map.php
I am a complete beginner to PHP and am looking for some help with a program I am messing around with

Internal Server Error issues
This has been bothering me for weeks and I've been trying to solve it without asking for help, but e

PHP - MySQL Fail
My PHP code will only execute the first part of my code...

Code: <?php

sessio

Show message after entering data
Hello Colleagues

I would like to display messages after entering the data example: "
dat

ereg_replace()
Basically what i need to do is

$title = "This Suck's"

$striped = ereg_repl

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

Help on code output
My CODE:

Code: [Select] echo "<phone>".$line["phone"].&qu

Save User Inputs while javascript reloading!
hi..
i have written a PHP code in which i reload the page when user selects a value in dropdown..

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