link to and edit page with the record ID number
Posted: Tue Feb 15, 2011 2:04 pm
Hi.
The code i'm using below lists all records as follows:
Name ID Number Company Name
john smith 1 ICBC
etc.
I need to be able to click on the id number and open an edit page for that specific record. I'm not sure how to go about doing that. I'd appreciate any help you may be able to offer. thx.
<?php
echo "<TABLE BORDER=\"0\" cellpadding=\"2\" cellspacing=\"2\">\n";
echo "<TR ><TD>Name</TD><TD>ID Number</TD><TD>Company Name</TD></TR>\n";
for($i = 0; $i < $numofrows; $i++) {
$row = mysql_fetch_array($result); //get a row from our result set
if($i % 2) { //this means if there is a remainder
echo "<TR >\n";
} else { //if there isn't a remainder we will do the else
echo "<TR > \n";
}
echo "<TD>".$row['Name']."</TD><TD>".$row['IDNumber']."</TD><TD>".$row['CompanyName']."</TD>\n";
echo "</TR>\n";
}
//close table
echo "</TABLE>\n";
?>
The code i'm using below lists all records as follows:
Name ID Number Company Name
john smith 1 ICBC
etc.
I need to be able to click on the id number and open an edit page for that specific record. I'm not sure how to go about doing that. I'd appreciate any help you may be able to offer. thx.
<?php
echo "<TABLE BORDER=\"0\" cellpadding=\"2\" cellspacing=\"2\">\n";
echo "<TR ><TD>Name</TD><TD>ID Number</TD><TD>Company Name</TD></TR>\n";
for($i = 0; $i < $numofrows; $i++) {
$row = mysql_fetch_array($result); //get a row from our result set
if($i % 2) { //this means if there is a remainder
echo "<TR >\n";
} else { //if there isn't a remainder we will do the else
echo "<TR > \n";
}
echo "<TD>".$row['Name']."</TD><TD>".$row['IDNumber']."</TD><TD>".$row['CompanyName']."</TD>\n";
echo "</TR>\n";
}
//close table
echo "</TABLE>\n";
?>