Forum Moderators: coopster

Message Too Old, No Replies

Syntax for href for a row

Need help getting to hre a row

         

JSoaper

8:10 pm on Feb 8, 2009 (gmt 0)

10+ Year Member


Once again newbie here.

I am trying to get the las row in my search output ot be a href to the record. It should href the word Edit. Here is the current code I have and all I have mamage so far is to get the ID Row to show again

echo '<table border="0" width="800" id="table1" style="font-family:arial" style="font-size:8pt"
div align="center">';

echo '<tr>';
echo '<th bgcolor="#C0C0C0" style="text-align:left;">ID #</th>';
echo '<th bgcolor="#C0C0C0" style="text-align:left;">Account No:</th>';
echo '<th bgcolor="#C0C0C0" style="text-align:left;">Company</th>';
echo '<th bgcolor="#C0C0C0" style="text-align:left;">Telephone</th>';
echo '<th bgcolor="#C0C0C0" style="text-align:left;">Edit</th>';;
echo '</tr>';

$sql ="select * from `clients` where $method like '%$text%'";
$query = mysql_query($sql);

while ($row = mysql_fetch_array($query)){
echo "
<tr>
<td>".$row['id']."</td>
<td>".$row['Account']."</td>
<td>".$row['Client']."</td>
<td>".$row['Telephone']."</td>
<td>".$row['id']."</td>

Any help appreciated.

STeeL

10:15 pm on Feb 8, 2009 (gmt 0)

10+ Year Member



It depends on how your code treats URLs, usually it's something like:

<td><a href='edit.php?client_id=".$row['id']."'>Edit</a></td>

[edited by: STeeL at 10:16 pm (utc) on Feb. 8, 2009]