Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8048051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:18:15+00:00 2026-06-05T06:18:15+00:00

Ok, so basically I have data I have added to an html table and

  • 0

Ok, so basically I have data I have added to an html table and a save button. I want this button to submit the data in the table to a php function so that I can modify my mysql database using the data. I have the tools to modify the database, as long as I can get the data. However, I have no clue how to do this. What is the best way to accomplish this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T06:18:17+00:00Added an answer on June 5, 2026 at 6:18 am

    In Addition to what @John Conde said, for every record presented in the table, you should create it’s respective hidden field i.e. a <input type="hidden"... />
    Considering that tables have rows and columns, I will make some assumptions:

    1. I will assume that the rows are equivalent to the data you have on a per record basis
    2. That the columns are the fields you will update with data on a per record basis

    Going on this assumption (let me assume 3 fields i.e. 3 columns and 2 records)

            Field 1    Field 2    Field 3
    Row 1     a          b          c
    Row 2     d          e          f
    

    For each of these we’ll create corresponding input fields in the form we’ll create to contain the submit button like so:

    <form action="" method="post">
        <!--Row 1-->
        <input type="hidden" name="field_1[]" value="a" />
        <input type="hidden" name="field_2[]" value="b" />
        <input type="hidden" name="field_3[]" value="c" />
        <!--Row 2-->
        <input type="hidden" name="field_1[]" value="d" />
        <input type="hidden" name="field_2[]" value="e" />
        <input type="hidden" name="field_3[]" value="f" />
        <!-- more rows if they exist -->
        <input type="submit" name="my_btn" value="POST IT!" />
    </form>    
    

    On the PHP side, you could then process the form fields, like so:

    foreach($_POST["field_1"] as $id=>$field1_value){
        $field2_value = $_POST["field_2"][$id];
        $field3_value = $_POST["field_3"][$id];
        .......
    }
    

    Hope this helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that shows data from a MySQL table. Basically, my application
I have an HTML/XML table generated by AJAX that displays limited columns of a
So I have this Excel workbook which basically is supposed to be a data
I have a table with records that has delete links. Basically I followed the
Possible Duplicate: Xcode: Storyboard Tabbed Application Passing Data Back and Forth Basically I have
I have a nice DataGridView showing what is basically some kind of log data
I basically have three tables, posts, images and postimages (this simply contains the ids
I basically have 7 select statements that I need to have the results output
I have a PHP script that works by calling items from a database based
Today I have seen this weird magic NTFS system supports: each file can have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.