Jump to content

passing


shage

Recommended Posts

Look into using sessions:

 

<?php

session_start(); // You must have this on every page

$_SESSION["width"] = 10; // Use these lines to define $_SESSION variables
$_SESSION["height"] = 15;

header("Location: anotherpage.php"); // The user can go to another page by clicking a link if you want, redirect used here as an example

?>

 

Then in anotherpage.php:

 

<?php

session_start(); // You must have this on every page

echo $_SESSION["width"]; // Output: 10
echo $_SESSION["height"]; // Output: 15

?>

Link to comment
https://forums.phpfreaks.com/topic/56841-passing/#findComment-280851
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.