The transfer of the order number during shopping is related to order insertion.

Source: Internet
Author: User
For more information, see <g id = "1"> purchase information </g>; use SESSION to display information and input required input delivery information & nbsp; click submit to insert the entered information into the database to input the generated order number to the page 2 & help: order Number transfer and order insertion during shopping
I wrote a shopping cart and saved the purchase information to the SESSION to go to the settlement page 1.
Display information with SESSION and input required to input delivery information
Click submit to insert the entered information into the database to pass the generated order number to page 2
On page 2, query the database with the obtained order number and output
The problem is that on page 1, you cannot insert a database.
You can also ask experts or have a correct number.

Page 1 code
PHP code
  
  
Receiver:
Shipping Address:
Zip code:
Tel:
"Name =" tijiaoding ">


Page 2 code
PHP code
  Session_start (); require_once '../db/conn. php'; require_once' ../util. php'; echo"
"; // Print_r ($ _ SESSION); // print_r ($ _ GET); // return; $ arr =$ _ SESSION [" mycar "]; // GET the variables in the session $ o_num =$ _ GET ['O _ num']; foreach ($ arras $ sk => $ sv) {// print_r ($ sv); // exit; $ quer_ding = "select * from ord where o_num = '{$ o_num}'"; print_r ($ quer_ding); exit; $ re_ding = mysql_query ($ quer_ding) or die (mysql_error (); // print_r ($ re_ding); // exit; foreach ($ re_dingas $ k => $ v) {?>
   
   
   
   
   
   
   
   


------ Solution --------------------
I didn't see the form. what do you use to submit it?
If JavaScript is used, at least the code should be pasted.
------ Solution --------------------
On page 1, you cannot insert a database.
I don't understand, go ('pay. php'); is it a jump? Then $ in_ord = mysql_query ($ ding); the value is true. It should be said that the insert is successful
------ Solution --------------------
If the input submit button is not displayed, the form data will not be submitted to jiesuan. php.
No data can be found in pay. php.
------ Solution --------------------
Submit to the insert page first. after the page is inserted, you can directly jump to pay. php from the insert page?

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.