Php + AJAX creation process 1: Which processes need to be clarified? 2: Who should execute each process? 3: What is the sequence of persons performing the process? Php + AJAX creation process
1: what procedures need to be clarified?
2: Who should execute each process?
3: What is the sequence of persons performing the process?
New processSelect node personnel:
Query ($ SQL, 1); foreach ($ arr as $ v) {echo"{$ V [2]}"; // Output single-choice button, index 2 in the array, that is, the user name, but its value is code}?>
$ ("# Addjd "). click (function () {var uid = $ ("# user "). val (); $. ajax ({url: "add. php ", data: {uid: uid}, type:" POST ", dataType:" TEXT ", success: function (data) {window. location. href = "xinjian. php "; // The page will be refreshed after the processing page is successfully executed }})})
(3) add. php
(4) the added nodes are displayed on the new process page.
$ V) {$ SQL = "select name from users where uid = '{$ v}'"; $ name = $ db-> strquery ($ SQL); echo"
{$ K} -- {$ name }--
";}}?>
After completing this step, the effect is as follows:
$ (". Yichu "). click (function () {var sy = $ (this ). attr ("sy"); // click this button to select this index number $. ajax ({url: "yichu. php ", data: {sy: sy}, type:" POST ", dataType:" TEXT ", success: function (data) {window. location. href = "xinjian. php "; // The page will be refreshed after the processing page is successfully executed }});})
(6) remove yichu. php from the processing page.
(7) after the node problem is solved, it is the process name. write the name text box: it is important to save the process, so there must be a save button.
Enter the process name:
$ ("# Baocun "). click (function () {var name = $ ("# mingcheng "). val (); $. ajax ({url: "baocun. php ", data: {name: name}, type:" POST ", dataType:" TEXT ", success: function (data) {alert (" saved successfully! ");}});})
(9) the processing page for saving the process
Query ($ SQL); $ arr =$ _ SESSION ["jiedian"]; foreach ($ arr as $ k => $ v) {$ SQL = "insert into flowpath values ('', '{$ code}', '{$ v}', {$ k })"; // pay attention to the table creation type. here the orders item uses the int type, so {$ k} does not need to add '', in addition, select auto-increment $ db-> query ($ SQL);} to create the table's primary key );}
Untitled Document