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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:02:57+00:00 2026-06-09T12:02:57+00:00

I have created a while loop while($row = mysql_fetch_Array($result)) { echo ‘<tr class=record> <td></td><td>’

  • 0

I have created a while loop

while($row = mysql_fetch_Array($result)) { 
  echo '<tr class="record"> <td></td><td>'
     . $row['company'] .'</td><td>'
     . $row['project'].'</td><td>'
     . $row['assignee']. '</td><td>'
     . $row['current_milestone'] . '</td><td>'
     . $date=date("d-m-Y", strtotime($row['start_date'])).'</td><td>' ..'</td><td>'
     . $row['next_milestone'] . '</td><td>'
     .   $date=date("d-m-Y", strtotime($row['next_date']))
     .'</td></tr>' ; 
}

This displays correctly but my question is:

How can the user select an individual row so he/she can edit it. I was hoping that the user can select which row they wanted and they would be taken to another screen where they can make the changes. I can figure out how to do the part where I can update the data. But it is the selecting the row and collecting correct data I dont understand how to do.

  • 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-09T12:02:58+00:00Added an answer on June 9, 2026 at 12:02 pm

    Embed an <a href='update.php?id=> somewhere in there which carries the record id to the update script as a parameter in the query string:

    while($row = mysql_fetch_Array($result)) { 
      echo '<tr class="record"> <td></td><td>'
         // Insert a link with an id parameter.
         // Use whatever column value uniquely identifies your row
         . '<a href="update.php?id=' . $row['id'] . '"> Edit this! </a>' 
         // etc... 
         // etc...
         // etc...
         .'</td></tr>' ; 
    }
    

    And retrieve it on the update script via:

    // Assuming an integer id was passed...
    // if it is some other string value, escape and quote it accordingly.
    $id = intval($_GET['id']);
    

    And you will want to check that the user making the edit has permission to edit that record. In other words, verify that the record is owned by the user is logged in, since anyone could technically visit the URL with any id, whether or not it belongs to them. As in:

    UPDATE yourtable SET col1 = 'whatever', col2 = 'whatever' WHERE id = $id AND user_id = 'logged_in_user'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created this function to check abecedarian with while loop (A word is
I have associated a Button ID while generating Buttons dynamically and created a Button
I have a while() function that loops a row of data within my table.
I am trying to do so whenever my while loop reach each 4 result
I created the following loop $x=1; while($x<=$excel->sheets[0]['numRows']) { $y=1; while($y<=$excel->sheets[0]['numCols']) { isset($excel->sheets[0]['cells'][$x][$y])? $excel->sheets[0]['cells'] [$x][$y]
I have a while loop that creates an array prior to json encoding the
I have a local repository. I created the whole application, but now I want
I have ran into an interesting issue while trying to create a more usable
I was just wondering while programming. I have got a rootViewController which creates an
I have created a QWidget with a bunch of QToolButtons in it and I

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.