I am wondering if this is possible:

I have a web page that displays a table which includes Work Order Numbers. I would like to make the numbers into a link that when I click it it automatically brings up an edit form for that particular record. For example, here is some code for the table:

while($row = mysql_fetch_array($result))
  echo "<tr>";
  echo "<td>" . $row['WO'] . "</td>";
  echo "<td>" . $row['Customer'] . "</td>";
  echo "<td>" . $row['Status'] . "</td>";
  echo "<td align=\"center\">" . $row['Entered'] . "</td>";
  echo "<td>" . $row['Description'] . "</td>";
  echo "</tr>";
echo "</table>";

Now, in the echo "<td>" . $row . "</td>"; line I would like something like:
echo "<td><a> " . $row . " </a></td>";
so that if I click the WO number it will search for that particular record and bring up a form where I can edit it. I just have no idea what code to put within the <a></a> tags to make this possible or if it is even possible. Another way that might work for me would be to put an edit button in each row.

If your question is on whether if it is possible, then yes.

but how to go about achieving that I think there are many ways.

pop-up? form appear in a div below? can be achieved one way or another..

google edit button for each row php

I should have posted my solution when I got it figured out. Here is what I did:

I used headers like this so I could sort by different columns
echo "<table border='1' rules='rows'>
<th><a href=\"viewTable.php?id=".WO."\" >WO</a></th>
<th><a href=\"viewTable.php?id=".Customer."\" >Customer</a></th>
<th><a href=\"viewTable.php?id=".Status."\" >Status</a></th>
<th><a href=\"viewTable.php?id=".Description."\" >Description</a></th>
<th><a href=\"viewTable.php?id=".Date."\" >Date</a></th>

This is how I created the links
while($row = mysql_fetch_array($result))
  if (is_int($cnt/2))
  { $bg="white";}
  echo "<tr bgcolor=\"".$bg."\">";
  echo "<td>" . "<a href=\"form1.php?id=".$row['WO']."\" >".$row['WO'] . "</a></td>";
  echo "<td>" . "   ".$row['Customer'] . "</td>";
  echo "<td>" . "   ".$row['Status'] . $row['Proof'] . "</td>";
  echo "<td>" . "   ".$row['Description'] . "</td>";
  echo "<td>" . "   ".substr($d,0,10) . "</td>";
  echo "</tr>";}
echo "</table>";

This sends the work order number to form1.php. The syntax could be improved, especially with quotes. This works but it doesn't look very tidy.

The $bg creates a different color for each row which makes the table easier to read.

how does the form1.php look like?

This is form1.php:

$con = mysql_connect("***.com","***","***");
if (!$con)
  die('Could not connect: ' . mysql_error());

If the work order is not found it automatically creates a new record with that number
mysql_select_db("***", $con);

$d=date("Y-m-d H:i:s");
$sql="INSERT INTO IP (WO, Customer, Description, Status, Entered, Date)VALUES('$search','','','','','$d')";

otherwise it pulls up the existing record
$data = 'SELECT * FROM IP WHERE WO = "'.$search.'"'; 
  $query = mysql_query($data) or die("Couldn't execute query. ". mysql_error()); 
  $data2 = mysql_fetch_array($query); 


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
<link rel="stylesheet" href="ip.css" />
<script type="text/javascript" language="javascript">

    function redirect()
        // you can also pass the complete URL of location
        // e.g.: http://www.google.com/ or
        // http://programming.top54u.com/Default.aspx



<!-- form to display record from database --> 
<form name="form" method="POST" action="form2.php" target="hidden"> 
<table align="center">
<td align="right">WO:</td><td><input type="text" name="WO" value="<?php echo $search?>" size=30" height="50"/></td>
<td align="right">Customer:</td><td><input type="text" name="Customer" value="<?php echo $data2[Customer]?>" size="30"/></td>
<td align="right">Description:</td><td><input type="text" name="Description" value="<?php echo $data2[Description]?>" size="30"/></td>
<table align="center" cellpadding="8" border="0">
	<td width="100" height="25">Status:</td>
	<td width="100"height="25" align="right">Proof: <input name="Proof" id="Proof" type="checkbox" value="|Proof" <?php if($data2['Proof'] == "|Proof"){echo 'checked="checked"';}?> /></td>

... a lot of radio buttons here for the status of the job... I have since changed my system of entry but if I would have continued with this system I would have rather used a drop down list.

<table align="center" border="0">
	<td width="100%" height="25" align="center"><input type="submit" style="height: 40px; width: 200px" value=" submit " /></td>
	<td width="100%" height="25" align="center"><input type="button" value="Return to Tableview" style="height: 40px; width: 200px" onclick="redirect();" /></td>