Php-Process Management (php + Ajax)

Source: Internet
Author: User
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 process

Select 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

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.