MDanz Posted March 5, 2010 Share Posted March 5, 2010 <?php $w = $_GET['w']; $h = $_GET['h']; $_SESSION['width']= $w; $_SESSION['height']=$h; ?> $w and $h stands for width and height which i get from the url from the page. To prevent always storing the width and height in the url for every page, i'd like to store it in a session. Above i think i've stored it correctly. How do i started the session. Does this start all sessions? <?php session_start(); ?> Quote Link to comment https://forums.phpfreaks.com/topic/194239-help-starting-session/ Share on other sites More sharing options...
PravinS Posted March 5, 2010 Share Posted March 5, 2010 Write session_start() at the top of every page where you need session variables. Quote Link to comment https://forums.phpfreaks.com/topic/194239-help-starting-session/#findComment-1021888 Share on other sites More sharing options...
MDanz Posted March 5, 2010 Author Share Posted March 5, 2010 how do i stop a specific session? i know its session_destroy(); but for a particular session? Quote Link to comment https://forums.phpfreaks.com/topic/194239-help-starting-session/#findComment-1021893 Share on other sites More sharing options...
PravinS Posted March 5, 2010 Share Posted March 5, 2010 Use session_unregister(VARIABLE) Quote Link to comment https://forums.phpfreaks.com/topic/194239-help-starting-session/#findComment-1021897 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.