We have a script where our agents get a link such as http://www.OURWEBSITE/11601/ at this address they get redirected to our main webpage on our website. It is supposed to grab the 11601 and use it to format a link that will bring them to another page on another website with their agentID of 11601, if no agentID is used then it should default to our agent ID. here is the code I have for redirection: <?php // change main_index.php to your site's index page (ie. index.php) $pageURL = $_SERVER['PHP_SELF']; $dom=explode("/",$pageURL); $agentID=$dom[1]; $redirectURL = "http://".$_SERVER['HTTP_HOST']."/index.php?agentID=".$agentID; header( "Location: $redirectURL" ); exit; ?> PHP: and here is the code i include in the main page of our website. <?php session_start(); require('dbconn.php'); $linkURL = "http://www.OTHERWEBSITE.com/backend/agents/clickthru.asp?AID=13110&PID=133&URLID=244&ADV=AGENTNAME"; $validid = "13110"; $agentname = "AGENTNAME"; $agentID = $_GET['agentID']; if (ctype_digit($agentID) && (strlen($agentID) == 5)) { $query = "SELECT id, name, hits FROM agents WHERE id = '$agentID'"; $result = mysql_query($query) or die("Could not query"); $num = mysql_num_rows($result); if ($num == 1) { $agent = mysql_fetch_array($result, MYSQL_ASSOC); if ($agent['id'] != '13110') { $hits = $agent['hits'] + 1; $agentname = $agent['name']; $validid = $agent['id']; $query = "UPDATE agents SET hits = $hits WHERE id = '$validid'"; $result = mysql_query($query); $linkURL = "http://www.OTHERWEBSITE.com/backend/agents/clickthru.asp?AID=".$validid."&PID=133&URLID=244&ADV=".$agentname; $hitsnr = $agent['hits']; } } if ($num != 1) { $linkURL = "http://www.OTHERWEBSITE.com/backend/agents/clickthru.asp?AID=13110&PID=133&URLID=244&ADV=AGENTNAME"; } } else { $linkURL = "http://www.OTHERWEBSITE.com/backend/agents/clickthru.asp?AID=13110&PID=133&URLID=244&ADV=AGENTNAME"; } ?> PHP: the agaent name ADV= is pulled from mysql db... and here is a sample of how we link it <?php echo '<a href= http://www.OTHERWEBSITE.com/backend/agents/clickthru.asp?AID='.$validid.'&PID=133&URLID=244&ADV='.$agentname.'>SIGNUP</a>' ?> PHP: as i said it works great on the main page but if a user navigates off the main page the ID is lost. I need a way to modify this so that no matter what page they go to the agentname and agentID is held, and the signup link holds the values so that when they signup the correct info is captured on the otherwebsite.