English 中文(简体)
页: 1
原标题:$_SESSION value to being sent across

I m in a real pickel:

我在做一个记录稿时,出于某种原因,“SESSION”变量没有从我的标识核对中排出。

I have tested this with an pre PHP Ver 5.2.12 and it worked. Have previously used this method. But the site I m using this method for now is PHP Ver 5.2.12

SO there are 2 differences between the two versions I have been able to notice, they are:

旧版本

页: 1 犯罪

OLD VERersion

届会时间:时间:0至2 1 P-4, 1 P-3, 1 FS, 1 NS

又the path for session.save_path are different in each version(does this matter??) This is my code for the logged in page:

LOGGEDIN PAGE

<?php 
session_start();
$var_user = $_SESSION[ US ];
//echo $var_user;//ouputs nothing =0
//if not logged in
if(!isset($_SESSION[ US ])) {
header ( Location:index.php );
 die();
}else if(isset($_SESSION[ US ])){   
include( connect.php );
//rest of script goes here
}

页: 1

PAGE THAT CHECKS THE VARABILES FROM THE LOGIN PAGE TOP OF PAGE

 <?php
 session_start();
 $var_pass =$_REQUEST[ PW ] ; 
 $var_user =$_REQUEST[ US ] ; 

标题

$_SESSION["US"]= $var_user;
//echo "login success";
header ( Location:loggedin.php );

这绝对是我的头脑,可能只是一个小的错误,我不会产生任何想法。

Thanks in advance.

问题回答

撰 写

session_start();

页: 1





相关问题
why the session in iis automatically log out?

I used iis6, and when i called a function Directory.delete(), the all the session relate this website will be logged out. and i debugged the website, i found no exception. any one have ideas on this ? ...

Check session from a view in CodeIgniter

What is the best way to check session from a view in CodeIgniter, it shows no way in their user guide, otherwise I will have to make two views on everything, which is kinda weird...still a newbie to ...

Can I get the size of a Session object in bytes in c#?

Is it possible to get the size(in bytes) of a Session object after storing something such as a datatable inside it? I want to get the size of a particular Session object, such as Session["table1"], ...

提供严格分类的出席会议物体

提供严格分类的与会机会的最佳方式是什么? 我正计划转而选择矩阵,这正在促使汇编者抱怨我的幻觉方案拟订方法......

PHP Session is not destroying after user logout

I m trying to create an authentication mechanism for my PHP Application and I m having difficulty destroying the session. I ve tried unsetting the authentication token which was previously set within ...

热门标签