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>";?> Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.