I'm still tryin to test my sessions...it just wont work.
<?php
session_start();
extract(mysql_fetch_assoc(mysql_query("SELECT password FROM users WHERE id = '$id'")));
$_SESSION['userid'] = $id;
$_SESSION['pwd'] = md5($passwd);
if($password == md5($passwd)) {
$valid_user = 1;
echo "Right.";
echo $_SESSION['userid']; // Returns "1" or whatever the ID might be
.......
if ($_GET[Goto] == "Login") {
session_start();
echo "<br>ID is still..."; // Returns "ID is still..." (this works)
echo $_SESSION['userid']; // Returns nothing (this doesnt)
}
Doesn't return on the second page? Why? Is still new to PHP >> 🙁
Just incase its useful...I'm using http://www.tripod.lycos.co.uk/ with PHP4u Version 3.0 (Based on PHP-4.3.2) And here is the phpinfo() session information...
Session Support: enabled
Registered save handlers: files user
session.auto_start: Off
session.bug_compat_42: On
session.bug_compat_warn: On
session.cache_expire: 180
session.cache_limiter: nocache
session.cookie_domain: no value
session.cookie_lifetime: 3600
session.cookie_path: no value
session.cookie_secure: Off
session.entropy_file: /dev/urandom
session.entropy_length: 16
session.gc_divisor: 100
session.gc_maxlifetime: 1200
session.gc_probability: 0
session.name: PHPSESSID
session.referer_check: no value
session.save_handler: files
session.save_path: /data/session
session.serialize_handler: php
session.use_cookies: On
session.use_only_cookies: Off
session.use_trans_sid: Off