I have moved the clear cart behaviour before the code shown below and it works ok. Is this is the correct location for it, if it is, again many thanks.
<?php
if($_SERVER["REQUEST_METHOD"] == "POST"){
$WA_Auth_Parameter = array(
"connection" => $contweedmill,
"database" => $database_contweedmill,
"tableName" => "users",
"columns" => explode($WA_Auth_Separator,"UserEmail".$WA_Auth_Separator."UserPassword"),
"columnValues" => explode($WA_Auth_Separator,"".((isset($_POST["Log_In_group_Email"]))?$_POST["Log_In_group_Email"]:"") ."".$WA_Auth_Separator."".((isset($_POST["Log_In_group_Password"]))?$_POST["Log_In_group_Password"]:"") .""),
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text"),
"sessionColumns" => explode($WA_Auth_Separator,"UserID"),
"sessionNames" => explode($WA_Auth_Separator,"SecurityAssist_UserID"),
"successRedirect" => "login.php?loggedIn=1",
"failRedirect" => "login.php?failedLogin=1",
"gotoPreviousURL" => TRUE,
"keepQueryString" => TRUE
);
WA_AuthenticateUser($WA_Auth_Parameter);
}
?>