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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:37:25+00:00 2026-05-14T08:37:25+00:00

I have 2 files, one is used to view the data in the mysql

  • 0

I have 2 files, one is used to view the data in the mysql database, and list it on a table:

if($_POST['general'] == 'ADDRESS'){
$result2 = mysql_query("SELECT * FROM student WHERE ADDRESS='$saddress'");


echo "<table border='1'>
<tr>
<th>IDNO</th>
<th>ADDRESS</th>
<th>LASTNAME</th>
<th>FIRSTNAME</th>
<th>VIEW</th>

</tr>";

while($row = mysql_fetch_array($result2))
  {
   echo "<tr>";
   echo "<td>" . $row['IDNO'] . "</td>";
echo "<td>" . $row['ADDRESS'] . "</td>";
  echo "<td>" . $row['LASTNAME'] . "</td>";
    echo "<td>" . $row['FIRSTNAME'] . "</td>";
    echo "<td><a href='update.php?id=" . $row['IDNO'] . "'>view</a></td>";

  echo "</tr>";
  }
echo "</table>";
}

And this one is the update.php which I am working on, I just want to be able to see the data that corresponds to the one the record that I clicked on the first one using the link “view”.

<?php
mysql_select_db("school", $con);
 $result3 = mysql_query("SELECT * FROM student WHERE IDNO='?'");
?>



<tr>
<td width="30" height="35"><font size="3">*I D Number:</td>
<td width="30"><input  name="idnum" onkeypress="return isNumberKey(event)" type="text" maxlength="5" id='numbers'/ value="<?php echo $row["IDNO"]; ?>"></td>
</tr>

But I do not know how do I link the two, in such a way that the corresponding data in here:

echo "<td><a href='update.php?id=" . $row['IDNO'] . "'>view</a></td>";

would be reflected in here:

<td width="30"><input  name="idnum" onkeypress="return isNumberKey(event)" type="text" maxlength="5" id='numbers'/ value="<?php echo $row["IDNO"]; ?>"></td>
    </tr>

Please give me an idea on how I can do this, thanks.

  • 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-14T08:37:25+00:00Added an answer on May 14, 2026 at 8:37 am

    In the first php file, you specified that the url that users can click will look something like:

    <a href="update.php?id=123"></a>
    

    You can get the value of “id” in update.php by:

    $id = $_GET['id']; // $id will be 123
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I used to have one class for one file. For example car.cs has the
I have several log files of events (one event per line). The logs can
I have recently converted 10 JavaScript files into one file, which I then run
I have a Powershell script that copies files from one location to another. Once
I have to copy quite a lot of files from one folder to another.
I have some databases that have four files each; one for PRIMARY, IDX, IMAGE,
I have 2 wav files that I want to concatenate into one file with
I have the following command which deletes files that are one day old and
I have 7-8 xml files. Each one is approximately 50 MB in size. What
I have huge number of Word files I need to merge (join) into one

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.