What bit is more secure?
   function login_customer($customer_details) {
    //Set a cookie to login the customer
    setcookie("Str_CUST_LOGIN", 1, time()+3600);
    setcookie("Str_CUST_EMAIL", $customer_details['customers_email']);
    setcookie("Str_CUST_ID", $customer_details['customers_id']);
    //Update the cart
    return true;
}
or is this below. The script uses IF ELSE statements. Nightmare application for old client.
   function login_customer($customer_details) {
    //Set a cookie to login the customer    
    $str_HA_CUST_LOGIN="1";
    // the customer details var gets info from a mysql escape form
    // so mysql /xss is stopped
    $str_HA_CUST_EMAIL=$customer_details['customers_email'];
    $str_HA_CUST_ID=$customer_details['customers_id'];
    $_SESSION["loggedIn"]=$str_HA_CUST_LOGIN;
    $_SESSION["userEmail"]=$str_HA_CUST_EMAIL;
    $_SESSION["userID"]=$str_HA_CUST_ID;
    return true;
}
I am trying to improve it and lock sessions down. Not done any Salt, MD5 based sessions strings yet as I was thinking of a database session - only issue here is MySQL is so overloaded we had to make a master and cluster load balancer on cloud servers. 200+ average orders per second on a quite day. So I want sessions??
 
     
     
     
    