redarrow Posted August 2, 2006 Share Posted August 2, 2006 You need to use post with or with out sessions to get the session to do somthink ha.test.php<?session_start();$name=."my name is redarrow";$age=."MY age is 31";$name$_POST['name']$age=$_POST['age'];$_SESSION['name']=$name; $_SESSION['age']=$age;echo"<a href='test_rsult.php'>test me</a>";?>test_result<?session_start();echo "<br>$name:$age<br>";?> Link to comment https://forums.phpfreaks.com/topic/16288-sessions-problem/page/2/#findComment-67632 Share on other sites More sharing options...
shoaibi Posted August 2, 2006 Author Share Posted August 2, 2006 nope that's not the case, i am not dumb enough to leakout my actual code like this even if just a inch of it ;), just wanna be more secure Link to comment https://forums.phpfreaks.com/topic/16288-sessions-problem/page/2/#findComment-67634 Share on other sites More sharing options...
mastermike707 Posted August 2, 2006 Share Posted August 2, 2006 Ok idk what to do, here is the session code I ussually use:[code=php:0]class session{ function start($auth = true) { session_start(); if(!isset($_SESSION['user_id']) && $auth) { header('Location: login.php'); exit; } $_SESSION['ip'] = $_SERVER['REMOTE_ADDR']; define('LOGGED_IN', (isset($_SESSION['logged_in'])) ? $_SESSION['logged_in'] : false); } function destroy() { $_SESSION = array(); session_destroy(); }}[/code]Try that and see if it works. Link to comment https://forums.phpfreaks.com/topic/16288-sessions-problem/page/2/#findComment-67636 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.