fareedreg Posted January 1, 2010 Share Posted January 1, 2010 in my first.php I am having variable $chkmemid having value of database memid.. I would like to pass it to second.php.. how can i pass it and recieve it at other end? thanks in advance $memid = $row['mem_id']; $chkmemid=$memid; Quote Link to comment Share on other sites More sharing options...
ldb358 Posted January 1, 2010 Share Posted January 1, 2010 use a session $_SESSION['value'] = $valuetobepassed; //then to access it $passedvalue = $_SESSION['value']; Quote Link to comment Share on other sites More sharing options...
oni-kun Posted January 1, 2010 Share Posted January 1, 2010 Yes, sessions are the simple way to go without $_GET/$_POST and is much more appropriate. Just note you'll have to put session_start(); on each page using sessions (first.php, second.php) 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.