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

  • SEARCH
  • Home
  • 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 7605601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:12:29+00:00 2026-05-31T00:12:29+00:00

I have a mysql table. I have created a html table and filled it

  • 0

I have a mysql table. I have created a html table and filled it with data from my mysql table using php and sql. I then want to be able to click a checkbox next to each row of data, and click edit, and be able to edit the data all from the webpage.

Code which i used to build the html table and fill it with mysql data:

$result = mysql_query("SELECT * FROM table");
 if (mysql_num_rows($result)>0){
 $r = mysql_fetch_array($result,MYSQL_ASSOC);
 $table="<table><tr style='background:#cccccc;'>";
 $firstLine="<tr>";
 foreach ($r as $k => $v){
   $table .="<td style='border:1px #ffffff solid;'>".$k."</td>";
   $firstLine .="<td>".$v."</td>";
 }
 $table.="</tr>".$firstLine."</tr>";
 while($r = mysql_fetch_array($result,MYSQL_ASSOC)){
   $table.="<tr>";
   foreach($r as $k => $v)
     $table.="<td>".$v."</td>";
   $table.="</tr>";
 }
  $table .="</table>";
 echo $table;
}

Can anyone help provide me with any guidance which will help me achieve 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-05-31T00:12:31+00:00Added an answer on May 31, 2026 at 12:12 am

    put each piece of data that could be changed into a text input, instead of just as text, with the value attribute what’s coming from the db and a name which can identify it. That way, you can check the box next to the text input and change it. when the data is sent to the server, anytime a checkbox is checked, that’s a row that will change in the db.

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

Sidebar

Related Questions

I've been using PHP to correlate my HTML table's row ID's with my MySQL
I have following HTML table: <form method=post action=update-table.php> <table class=table-data style=width: 960px;> <thead> <tr>
I have this in a MySQL db: table Message sender_id int recipient_id int created
I have created a test table in MySQL and would like to insert 10
I have an ISAm table in mySql that was created similar to this: create
I have created a MySQL database using MySQL Workbench. It has about 20 tables.
I've created a blog main page using PHP and have included a sidebar and
I have implemented a dynamic creation of a HTML table using AJAX. Here's what
hi i created a simple php/mysql/Ajax chat application and I have a few questions.
I made some CMS in PHP which manipulates with data from MySQL. In my

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.