Home  >  Q&A  >  body text

After the user adds items to the shopping cart and saves them to the session, how to store the shopping cart information in the database?

<?php
header("Content-type: text/html; charset=utf-8");
  session_start();//启动session
  // session_destroy();
  // die();
  // var_dump($_SESSION);
  // die();
  if(isset($_SESSION['username']) &&!empty($_SESSION['username'])){
   
  }
  else{
    echo '<script language="JavaScript">;
          alert("尚未%E{               $chuxian = true; '] =$number; /alert("Addition successful!");location.href="header.php";</script>;';
         
        exit;
 // var_dump($_SESSION); //    die ();
  
  
 ?>

cyjy622cyjy6221774 days ago944

reply all(0)I'll reply

No reply
  • Cancelreply