tailieunhanh - PHP & MySQL Everyday Apps for Dummies phần 5

Phương pháp này trả về giá trị của một biến phiên PHP được lưu trữ. Kiểm tra xem biến tồn tại trong phiên giao dịch. Nếu có, phương thức trả về giá trị biến. Nếu biến không tồn tại, phương thức trả về FALSE và lưu trữ một thông điệp thông tin. | Chapter 6 Shopping Cart Application 161 1 Shopping cart You can use several mechanisms to store the shopping cart while the customer continues to shop before the order is submitted. The customer needs to be able to add and remove items from the shopping cart while putting together the final order. The most common techniques for storing the shopping cart contents are Database table More secure but more overhead. Cookies The customer might have cookies turned off. Session variables Less secure on a shared server. Text file Easy but less secure. Other less common methods are sometimes used. The application in this chapter stores the shopping cart two different ways. The procedural program stores the shopping cart items in the MySQL database. The object-oriented program stores the shopping cart items in a session variable. Application functionality design The basic function of the shopping cart application is to collect the information needed to complete a customer s purchase. The application should Display the products so that the customer can select products to purchase. This step is provided by the online catalog application which I describe in detail in Chapter 5. However you need to add some additional features to the catalog to allow online purchasing. I cover the additional features in this chapter. Keep track of the products selected by the customer. The customer should be able to see what he has already selected at any time. The customer should also be able to remove any selections. Collect the information needed to ship the product to the customer. You need the customer s name and address. Also you need a phone number in case of delivery problems. An e-mail address is useful for communication. The application can also collect any information required to compute shipping charges. Collect the information needed to charge the customer. The application collects credit card information a billing address and the exact name associated with the credit card. In this .

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.