Jump to content

Search the Community

Showing results for tags 'ajax php post dynamic'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (Dreamweaver, Zend, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hi All, I have generate a form which contain the id and name. the name and id i use php foreach them from database, to make it simple, im just copy the HTML and paste it here. each of them have individual approval status and remarks. once submit, it should update individual rows. I am using ajax to post. My current code. <html> <body> <hr> <section> <h3 id="title454"> Requestor </h3> </section> <form id="form" action="" method="post"> <table> <tr> <th>Employee Name</th> <th>Employee ID</th> <th>Remark</th> <th>Action</th> </tr> <tr><td>Kelvin</td><td>EE123</td><td><textarea name="remark[]"></textarea></td><td><select name="status[]"><option disabled value="">-Pending-</option><option value="Approved">Approve</option><option value="Reject">Reject</option></select><br></td></tr><tr><td>James</td><td>EE156</td><td><textarea name="remark[]"></textarea></td><td><select name="status[]"><option disabled value="">-Pending-</option><option value="Approved">Approve</option><option value="Reject">Reject</option></select><br></td></tr></table> <hr> <table> <ul> <section> <h3 id="title454"> 1st Level Approval </h3> </section> <li> <label>Amount Approved</label> <span> <select name="amount-approved"> <option disabled value="" selected>-Select-</option> <option>50%</option> <option>100%</option> </select> </span> </li> </ul> </table> <input id="submit" type="button" name="submit" value="submit"> </form> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script> $(document).ready(function(){ // click on button submit $("#submit").on('click', function(){ // send ajax $.ajax({ url: 'tier_one_submit_status.php', // url where to submit the request type : "POST", // type of action POST || GET dataType : 'json', // data type data : $("#form").serialize(), // post data || get data success : function(result) { // you can see the result from the console // tab of the developer tools console.log(result); }, error: function(xhr, resp, text) { console.log(xhr, resp, text); } }) }); }); </script> </body> </html> after click the submit button, i would like to update the data individually. Please help.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.