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?