Good day to all!
I am having an issue with passing info to a new page. I have a query that selects users from a database, and I have made their names a link to more information about them.
The problem is that either the table shows up in a color that I don't want, or I don't get the right information passed to the new page.
Here is the code I am referring to:
<?php
$query = "SELECT CONCAT(lname, ', ', fname) AS name, extension, office, employeeID FROM employee ORDER BY lname ASC LIMIT $start, $display";
if($result) {
echo '<table align="left" bgcolor="#cccccc" cellspacing="2" cellpadding="2">
<tr><td align="left"><b>Name</b></td>
<td align="left"><b>Extension</b></td>
<td align="left"><b>Office</b></td>
</tr>';
$bg='#eeeeee';
while ($row = mysql_fetch_array ($result, MYSQL_NUM)) {
$bg = ($bg=='#eeeeee' ? '#ffffff' : '#eeeeee');
// Display each record.
echo '<tr bgcolor="', $bg, '">
<td align="left"><a href="homephone.php?pid={$row[3]}">', $row[0], '</a></td>
<td align="center">', $row[1], '</td>
<td align="center">', $row[2], '</td></tr>';
} // End of while loop.
?>
As the code is right now, when I hover over the link, or click the link the info that gets passed to the new page is homephone.php?pid={$row[3]}, when what I am looking for is the value of $row[3].
If I change the code to work properly, then the table shows up in a nasty green color, that is not easy to look at.
Just a little more info: I am using css for the basis of the site, and have even tried to find something there that could help, to no avial.
Any ideas and or pointers to the right direction would be appreciated.
Thanks,