I've started a session.
A form on the page posts data to mySQL db
Page refreshes back to self but displays a "Process Complete" message via heredoc syntax.
The contents of the heredoc is formatted as an HTML page including a META TAG refresh to a different page.
This new page (page 3) needs to be part of the session but seems not to be.
Here is some code;
The 3rd page is to be part of the session and is to use the session id as a var in a mySQL queryPHP Code:// page 2
session_start();
$_SESSION['type_id'] = $type_id; // use if first page of session
echo $_SESSION['type_id'];
// some query stuff and other stuff here
// the heredoc with META TAG directing to 3rd page of series
echo <<<EOD
<html>
<head>
<title>Admin Page</title>
<META HTTP-EQUIV="Refresh" CONTENT="05; URL=http://www.domainname.com/page3.php">
</head>
<body>
<div id="gallery">
<p>Process complete!</p />
</div>
</body>
</html>
EOD;
}
So in the mySQL query, the WHERE category_type is to be the same value as the value of $type_id which is the session id.PHP Code:// page 3
session_start();
$type_id = $_SESSION['type_id'];
echo $_SESSION['type_id'];
$result = mysql_query( "
SELECT category_id,category_name,category_type,category_order
FROM gallery_category
WHERE category_type='$type_id'
ORDER BY category_order" );
How far off am I? Thanks.
//






Bookmarks