This article introduces how to implement php multi-step voting survey form filling. it is roughly to retrieve the content filled by the user and save it in a hidden place. then, the last step is submitted to the database. 1. the php code is as follows: Copy the code...
This article introduces how to implement php multi-step voting survey form filling. it is roughly to retrieve the content filled by the user and save it in a hidden place. then, the last step is submitted to the database.
1. php
2. php
3. php
4. php
The code is as follows: |
|
$ Base1 = $ _ REQUEST ['base1']; $ Base2 = $ _ REQUEST ['base2']; $ Prcname = $ _ REQUEST ['prcname']; $ Price = $ _ REQUEST ['price']; $ PrcXH = $ _ REQUEST ['prcxh']; $ Other1 = $ _ REQUEST ['other1']; $ Other2 = $ _ REQUEST ['other2']; $ Sql1 = "insert into [base_table] (base1, base2) values ('{$ base1}', '{$ base2 }')"; $ Sql2 = "insert into [prc_table] (prcname, price, prcXH) values ('{$ prcname}', '{$ price}', '{$ prcXH }') "; $ Sql3 = "insert into [other_table] (other1, other2) values ('{$ other1}', '{$ other2 }')"; Query ($ sql1 ); Query ($ sql2 ); Query ($ sql3 ); Echo "write complete "; ?> |
Summary
This problem is that if the user accidentally closes the page data, it will be re-filled. However, this method is used by many large websites, this is also the case for new users in Baidu's Encyclopedia.
Address:
Reprinted at will, but please attach the article address :-)