How to do this-php Tutorial

Source: Internet
Author: User
How to do this? On Interface 2, enter the customer information, select the room number, and check in the number of days. there is a confirmation button. Click "OK" to display page 3 "price Name", "Price", "discount", "deposit", "payable amount", "paid amount", and "change to zero". a "OK" button is displayed. I have two questions: 1. in this case, the customer information, room number, and number of days of entry should be written into the database. after receiving the payment on page 3, click "OK" to write it? The data is transmitted from the form on the previous interface. how can this data be written? 2. how is interface 3 generally implemented?
On Interface 2, enter the customer information, select the room number, and check in the number of days. there is a confirmation button.
Click "OK" to display page 3 "price Name", "Price", "discount", "deposit", "payable amount", "paid amount", and "change to zero". a "OK" button is displayed.

I have two questions:
1. in this case, the customer information, room number, and number of days of entry should be written to the database. after receiving the data on page 3, click OK to write the data? The data is transmitted from the form on the previous interface. how can this data be written?
2. Does the collection information on interface 3 need a unique identifier? Otherwise, anyone can take a copy to refund the deposit. How do I generate this identifier and retrieve the id directly from the database?

------ Solution --------------------
1: write data to the database on interface 3. Pass: interface 3 also creates a form. Write the value submitted in Interface 2 to the form. Click OK to write the data to the database.

Well. Is a unique identifier. Retrieve the unique id from the database.
------ Solution --------------------
This process is the same as the shopping cart of the mall-placing orders
------ Solution --------------------
Simply put, you can use serialize () to convert the array to a string first. Then, convert unserialize () to an array on the page where the parameters are received, so that it is OK.
Complex, you can traverse this array
Foreach ($ array as $ key => $ value)
Echo" ";

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.