A user will click on a link which will open a new page (code below). My problem is that when this new page is opened, it creates a NEW session ID. How do I stop this from happening?
require_once('../../config.php'); //Database connection details
require_once('../../connect.php'); //Connect to database
session_start(); <----------- HERE
if(isset($_GET['id']))
{
$id = $_GET['id'];
$tbl_uploads = $_SESSION['COMPANY_ID'].'_uploads';
$query = "SELECT username, type, size, content FROM $tbl_uploads WHERE id = '$id'";
$result = mysql_query($query) or die('Error, query failed');
list($username, $type, $size, $content) = mysql_fetch_array($result);
header("Content-length: $size");
header("Content-type: $type");
header("Content-Disposition: inline; filename=$username");
echo $content;
mysql_close($link);
exit;
}