your answer not working
I followed the directions and checked 1) and 2) in your response, but I still get the same error messages (the same one twice). This is the error msg:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /Applications/MAMP/htdocs/ProRes_from_Bill/TMP5LMPITUS5.php:5) in /Applications/MAMP/htdocs/ProRes_from_Bill/WA_eCart/WA_eCart_Definition_PHP.php on line 465
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /Applications/MAMP/htdocs/ProRes_from_Bill/TMP5LMPITUS5.php:5) in /Applications/MAMP/htdocs/ProRes_from_Bill/WA_eCart/WA_eCart_Definition_PHP.php on line 465
I tried attaching a screen capture of the definition file so you can see what it looks like in that section (screen cap so you can see the line numbers), the "Manage Attachments" just gives me a blank window, so I'll copy and paste just the code (I added a label for line 465):
//Session Storage Functions
function Session_SaveCart() {
if (!session_id()) session_start();
$theCartString = "";
for ($n=0; $n<sizeof($this->Items); $n++) {
$countIt = 0;
if ($n!=0) {
$theCartString .= "§";
}
foreach ($this->Items[$n] as $m) {
if ($countIt != 0) $theCartString .= "|WAECART|";
$theCartString .= $m;
$countIt++;
}
}
$_SESSION[$this->CartName."_Items"] = $theCartString;
}
function Session_GetContent() {
*Line 465:* if (!session_id()) session_start();
$retArray = array();
if (isset($_SESSION[$this->CartName."_Items"]) && $_SESSION[$this->CartName."_Items"] != "") {
$theCartString = $_SESSION[$this->CartName."_Items"];
$theItemArray = explode("§",$theCartString);
for ($x=0; $x<sizeof($theItemArray); $x++) {
$theValueArray = explode("|WAECART|",$theItemArray[$x]);
$toExec = "new ".$this->CartName. "_ItemDefinition(";
for ($y=0; $y<sizeof($theValueArray); $y++) {
if ($y != 0) $toExec.=", ";
$toExec .= '"'.str_replace("\'","'",addslashes($theValueArray[$y])).'"';
}
eval("\$nextItem =".$toExec.");");
$retArray[sizeof($retArray)] = $nextItem;
}
}
return $retArray;
}
Thanks, Jim