Thanks for that. I did run it and did get Hello World.
There are two queries making up a table. The first one gets the rows the second one makes the totals of those rows:
beginning of table page:
// start the session
session_start();
header("Cache-control: private"); //IE 6 Fix
echo "<strong>Step 2 - Register Session </strong><br />";
// Get the user's input from the form
$Division = $_POST['DIVISIONCD'];
$Type = $_POST['Type'];
// Register the input with the value
$_SESSION['DIVISIONCD'] = $DIVISIONCD;
$_SESSION['Type'] = $Type;
query 1:
/* connect to db */
include ("TFWConnect.php");
//load it all into the associative array
$sql = "select DIVISIONCD,MODEL,DESCRIP,DTargetQty,RTargetQty,OnOrder,Received,
Active,NRW,PreDisposal,Disposed, Returned,
(OnOrder+Received+Active+NRW+PreDisposal+Disposed+Returned) as GroupTotal
from dbo.vwTFW_Statistics
where DIVISIONCD = '".urldecode($_SESSION['DIVISIONCD'])."'
and TYPE = '".urldecode($_SESSION['Type'])."'";
$result = mssql_query($sql);
table data blah blah
second query:
$Totsql = "select
SUM(OnOrder)AS TotOnOrder,
SUM(Received) as TotRecieved,
SUM(Active) as TotActive,
SUM(NRW)as TotNRW,
SUM(PreDisposal)as TotPreDisposal,
SUM(Disposed)as TotDisposed,
SUM(Returned)as TotReturned , sum(OnOrder+Received+Active+NRW+PreDisposal+Disposed+Returned) as TotGroup
from dbo.vwTFW_Statistics
where DIVISIONCD = '".urldecode($_SESSION['DIVISIONCD'])."'
and TYPE = '".urldecode($_SESSION['Type'])."'";
$Totresult = mssql_query($Totsql);
This is where it trips up and drops the variable. If I make it REQUEST instead of SESSION it works. It just seems to forget it ever saw the session variables.
Thanks for taking a look
Laura