Thanks jason,
i actually did a work around with an if statement on the row which checks to see if the fields in the row contains any values, which seems to work.
but reseting the $row_recordset is a much better method, which i will remember for next time.
sorry to take this thread a little of topic:
i am still having problems clearing the session id on the response page.
i am using worldpay which pulls in the page from the server, then displays it through the confirmation page on their site, so i dont know if this would actually clear the session for my site.
any ideas? i guess a workaround would be to have a button on the response page hat links back to mysite, and rather than going to my index page it would go to a clear session page then redirect to the index page.
this is he code i have at the end of the response page:
<?php
// WA eCart Trigger Clear Cart
$eCart1->ClearCart();
?><?php
// Initialize the session.
// If you are using session_name("something"), don't forget it now!
@session_start();
//store the UserID Session Variable
if(isset($_SESSION['UserID']) && $_SESSION['UserID'] != "") {
$UserID = $_SESSION['UserID'];
}
if(isset($_SESSION['UserGroupID']) && $_SESSION['UserGroupID'] != "") {
$UserID = $_SESSION['UserGroupID'];
}
// Unset all of the session variables.
$_SESSION = array();
// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
if (isset($_COOKIE[session_name()])) {
@setcookie(session_name(), '', time()-42000, '/');
}
// Finally, destroy the session.
session_destroy();
@session_start();
//Reset the UserID Session Variable
if(isset($UserID) && $UserID != "") {
$_SESSION['UserID'] = $UserID;
}
if(isset($UserGroupID) && $UserGroupID != "") {
$_SESSION['UserGroupID'] = $UserGroupID;
}
?>
what would you reccomend?