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 7826801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:35:11+00:00 2026-06-02T09:35:11+00:00

I want to do something like this.. I have a update form in PHP,

  • 0

I want to do something like this..

I have a update form in PHP, which contains around 15 fields,

I want to show some data in tabular manner while you open the page for update..

Senario:

If you want to update a record of a person on day to day basis, I have the feature with me to search out that person form database, and when you click on update data..

it should show in a manner that,

field1…..———-
field2…..———-
field3…..———-

and now,

for field4,5,6,7

if these fields contain the data then show in a table manner with fields 4,5,6,7 as coloums and no of rows depending upon the number of entries (should be non editable)(assume the case of multiple input)

then form will continue.
field4…..——–
field5…..——–
field6…..——–
field7…..——–

typically these field(4,5,6,7) gets their value update frequently and I have to maintain the previous inputs also.

help me out with some solution, as I am unable to figure out how to do this?

before that i was using this.. here i was having a form field which can generate 5 options, and will populate the fields with data if u have entered before, now i want to change the display as I don’t want user to play with the old data, so I want to show old data into a table and enter new data via a simple text field,

as their is no point to keep these multiple input form field as user is updating only one value at a time.

<script>
                    function Submitted_Date(value,object)
                    {
                    value = document.getElementById("subdate_num").value;
                    if (value > -1) {
                    var input= new Array(value);
                    var p;
                    //alert("Enter The fields You Know ");


               var ele = document.getElementById("subdate");

              if(ele.hasChildNodes())
              {
              var len = ele.childNodes.length;
              while(ele.childNodes.length - value > 1)
             {
                ele.removeChild(ele.lastChild);
             }
             }

          for (var i=len-1;i<value;i++)
                    {
                        p= i+1;
                        input[i] = document.createElement('div');

                        input[i].innerHTML = 'Submitted_Date' + p + ':  &nbsp;&nbsp; <input type="text" value="" name="subdate' + p + '" id="subdate' + p +'" size = 25 onclick="javascript: showCalendar("Submitted_Date'+ p +'")"/>';
                                    document.getElementById("subdate").appendChild(input[i]);
                                    var subdate = 'subdate' + p;



                    }
              }
              document.getElementById("subdate1").focus();

                    }
                    </script>


                    <tr>
    <td> Submitted Date  : 
        <select name="subdate_num" id="subdate_num" onChange="return Submitted_Date(this.value,this.form)">
          <?php
  for ($i=0;$i<=5;$i++)
  {
    if ($i==0) { $temp = "<option value=$i> - </option>"; echo $temp; }
    else { $temp = "<option value=$i>$i</option>";
    echo $temp; }
  }
  ?>
        </select></td>
      </tr>
    </table>
<table>
  • 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-02T09:35:13+00:00Added an answer on June 2, 2026 at 9:35 am

    I think this is what you want, this will show the information in a table with as many (or few) columns as you want

    $query = "SELECT * FROM announcements ORDER BY announceid";
    $result = mysql_query($query);
    
    echo "<table border='1'>
    <tr>
    <th>Announcement ID</th>
    <th>Announcement Name</th>
    <th>Announcement Category</th>
    <th>Approved?</th>
    <th></th>
    </tr>";
    
    if ($result && mysql_num_rows($result) > 0) {
    $x = 0;
    while ($row = mysql_fetch_array($result)) {
    
     echo "<tr>";
      echo "<td>" . $row['announceid'] . "</td>";
      echo "<td>" . $row['title'] . "</td>";
      echo "<td>" . $row['category_name'] . "</td>";
     echo "<td>" . $row['status'] . "</td>";
      echo '<td><a href="edit.php?announceid='.$row['announceid'].'">Edit</a></td>';
      echo "</tr>";
    $x ++;
    };
    
      echo "</table>";
    

    Let me know if that is what you are looking for, or if there is any other way I can help. Thanks!

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

Sidebar

Related Questions

I have some folder with different files. I want to use something like this:
What I want to do is something like this: I have enums with combined
I want to achieve something like this inside a UIView: I have created a
I want to do something like this, I have a dictionary with keys and
I want to have on my page something like This page last refreshed on:
I have something like this in my code: worker.setObject(queue.poll()); I want a queue that
I want to parse a html content that have something like this: <div id=sometext>Lorem<br>
I want to have 3 divs aligned inside a container div, something like this:
So I have Image like this (source: de-viz.ru ) I want to get something
So I have Image like this (source: de-viz.ru ) I want to get something

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.