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

Help adding strtolower( to my in_array
strtolower i need to add it to this to work, iuno how.

Code: $moderators = array('Admin', 'ba

Filtering Tables
Hello Thanks for any help any one can give Im very new to PHP..

I need to pull data for clien

big pagination problem in php
<?php

$connect = mysql_connect("localhost", "root", "")

Paypal
Hi all,

I have an advanced basic knowledge of php

I want to try something new for a s

Files in current folder. Should be an easy fix.
Never mind. I've asked about this before and just found my answer. Anyway to delete this?

Passing JS to PHP
So I have the following
Code: <?php
getdetails(?><script type="text/

PHP Game
hy i was wondering what's the best method in order to make some automatic updates in a php game
<

please help
HTML Code:

Code: <span id="ctl00"><span>

While Problem
i am having a problem with a while statement here is the code
Code: [Select]<?php
sess

line breaks in between fetched file names
Hi,

I have this code:
Code: <?php
if($dir = opendir('files')){
while (($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