Hi folks, i am having a little trouble with sessions and would appreciate any help. What i am trying to do is have the user login and save the password that they enter into a session so i can use the variable in the next page. But for some reason the variable wont get saved in the session. Below is the code and php session info from the server.
<?php
session_start();
$user="root";
$pass="";
$database="isp";
$use=$_POST['Username'];
$pas=$_POST['Password'];
mysql_connect(localhost,$user,$pass);
@mysql_select_db($database) or die("Unable to select database");
$query="SELECT * FROM userinfo WHERE email = '$use' AND telephone = '$pas'";
$row = mysql_fetch_assoc(mysql_query($query));
mysql_close();
if($row['email'] == $use && $row['telephone'] == $pas){
$_Session['pas']=$pas;
echo $_SESSION['pas'];
//header("location:index-post.php");
}
else{
header("location:LogIn.html");
}
?>
and the server info:
session
Session Support enabled
Registered save handlers files user
Registered serializer handlers php php_binary
Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_httponly Off Off
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.hash_bits_per_character 4 4
session.hash_function 0 0
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /tmp /tmp
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid 0 0