Segment 3. Create a new basket and add a project to it ;? Php // set the project count to 1 $ ses_basket_items1; // fill in the 0th positions of the four arrays, the value passed through the href link // The link is added to the link in 'Add link to your Page' section. $ ses_basket_name [0] $ basSyntaxH
Segment 3. Create a new basket and add a project to it
$ #@ 60 ;? Php
// Set the project count to 1
$ Ses_basket_items = 1;
// Fill in the 0th positions of the four arrays and use the values passed from the href link
// The link is described in 'Add a link to your page '.
$ Ses_basket_name [0] = $ basket;
$ Ses_basket_amount [0] = 1;
$ Ses_basket_price [0] = $ price;
$ Ses_basket_id [0] = $ id;
// Register a new basket in the session
Session_register ("ses_basket_items ");
Session_register ("ses_basket_name ");
Session_register ("ses_basket_amount ");
Session_register ("ses_basket_price ");
Session_register ("ses_basket_id ");
? $ #@ 62;
In this way, a basket will be created, so the value will be filled in the 0th position of the array, and the array will be registered using session. A basket was born.