Jump to content

help starting session


MDanz

Recommended Posts

<?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(); ?>

Link to comment
https://forums.phpfreaks.com/topic/194239-help-starting-session/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.