$key = $_REQUEST['quote'];
$quotes = $_SESSION['quotes'][$key];
//unset($_SESSION['quotes'][$key]);
$doc = $file_array[$key];
// handle a new quantity request
if(isset($_REQUEST['qty']) && preg_match('/^\d+$/',$_REQUEST['qty']))
{
if(!(is_array($quotes)))
$quotes = array();
//print $_REQUEST['qty'];
$found = false;
if(count($quotes) > 0)
{
foreach($quotes as $qty)
{
if($qty == $_REQUEST['qty'])
$found = true;
}
}
//print_r($quotes);
if(!$found) {
print "Before";
print_r($quotes);
array_push($quotes, $_REQUEST['qty']);
print "After";
print_r($quotes);
$quoteString = implode(",",$quotes);
$_SESSION['quotes'][$key] = explode(",",$quoteString);
} else {
$quoteString = implode(",",$quotes);
$_SESSION['quotes'][$key] = explode(",",$quoteString);
}
//print_r($quotes);
//sort($quotes);
//print_r($quotes);
//print_r($_SESSION['quotes'][$key]);
//$_SESSION['quotes'][$key] = array();
//$quotes = $_SESSION['quotes'][$key];
print "Session";
print_r($_SESSION['quotes'][$key]);
-- Aaron Axelsen lists@xxxxxxxxxxxx
Great hosting, low prices. Modevia Web Services LLC -- http://www.modevia.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php