# Passing Variable value between multiple pages

**URL:** <https://forum.kirupa.com/t/passing-variable-value-between-multiple-pages/273915>\
**Category:** Uncategorized\
**Created:** [October 22, 2008, 2:36pm UTC](https://forum.kirupa.com/t/passing-variable-value-between-multiple-pages/273915 "2008-10-22T14:36:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rocketrud](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@Rocketrud](https://forum.kirupa.com/u/Rocketrud)\
**Post date:** [October 22, 2008, 2:36pm UTC](https://forum.kirupa.com/t/passing-variable-value-between-multiple-pages/273915/1 "2008-10-22T14:36:33Z")

</div>

Simplified Story Page

```php

<?
include("include/config.inc");
include("include/dbConnect.php");
include("include/xmlSerializer.php");
include("include/stringFunctions.php");
include("include/displayFunctions.php");
include("include/displayClasses.php");
?>
<link rel="stylesheet" type="text/css" href="/rss/rssdisplaybox.css" />
<script type="text/javascript" src="/rss/virtualpaginate.js"></script>
<script type="text/javascript" src="/rss/rssdisplaybox.js"></script>

<style type="text/css">

#MKC{
width: 500px;
padding: 10px;
}

#MKC .rsscontainer{ 
margin-bottom: 1em;
}

</style>
<?
If ($_GET['storyID']) {
  $storyID = $_GET['storyID'];
} Else if ($_POST['storyID']) {
  $storyID = $_POST['storyID'];
}

$getXMLFileSQL = "SELECT storyXMLxref.storyXMLFile,storyCatxref.catID,category.catName,category.catParent,story.storyComment FROM storyXMLxref,storyCatxref,category,story WHERE story.storyID = storyXMLxref.storyID AND storyXMLxref.storyID = storyCatxref.storyID AND storyCatxref.catID = category.catID AND storyXMLxref.storyID = ".$storyID;
$getXMLFileResult = mysql_query($getXMLFileSQL,$localDB);
list($XMLFile,$storyCatID,$catName,$catParent,$storyComment) = mysql_fetch_row($getXMLFileResult);
				
$xmlStr = file_get_contents("stories/".$XMLFile);
$storyXMLArray = XML_unserialize($xmlStr);

$metaDescription = $storyXMLArray['story']['summary'];
$metaKeywords = str_replace(" ",",",$storyXMLArray['story']['headline']);
$pageTitle = WEBSITE_NAME.": ".$storyXMLArray['story']['headline']; 

//Get Breadcrumb array for top nav and template definition
$navTrail = new NavigationTrail;
$trail = $navTrail->CreateTrail2($storyID,'story',$localDB);

//Set top level category for templating
$templateURL = $trail[1][1]
?>

<? include("template/header.php"); ?>

<h3>Related Stories</h3>
<script type="text/javascript">
var cssdrivebox=new rssdisplaybox("MKCRSS", "MKC", "someclass")
cssdrivebox.set_items_shown(4) // 4 entries
cssdrivebox.set_template("titles")
cssdrivebox.start() //Required: start script
</script>

<? include("template/footer.php"); ?>

```
