Forum Moderators: coopster
I have a page that i call the "snapshot" of a table in my database...it shows the first 5 colums of the table, as a quick reference overview of the data....
which obviously is pulled from the database, and displyed in a simple table layout.
From there the user can select the record ID and pass that on to the modify.php page for modification and updating the table.
Can i also have a drop down menu that filters the displayed table by specific agent?
For instance i first see the table with John and Janes entries.... i want to filter just by John and display only his entries....
can i do this?
what i have below is the "snapshot" of the table....just basically displays the table, and you can select the record by ID to modify ....
im just not sure how to structure this to create another query that would kind of, overwrite this table, and only show by Agent for instance...
_________________________________________________________________
<table>
<form action="{page_link_28}" method="post">
<tr>
<td width="79%">Enter Record Number to Modify:</td>
<td width="21%"><INPUT TYPE="text" NAME="rec_id" SIZE="9" MAXLENGTH="5"></td>
</tr>
<tr>
<td> </td>
<td><INPUT TYPE="submit" NAME="go" VALUE="Modify"></td>
</tr>
</form>
</table>
<!--<?php
//connect to database
$q="SELECT * FROM Registration_Data ORDER BY nhm_associate ASC";
$result = mysql_query( $q, $dbh )
or die(" - Failed More Information:<br><pre>$q</pre><br>Error: " . mysql_error());
$num_rows = mysql_num_rows($result);
if ($myrow = mysql_fetch_array($result)) {
echo "<table>";
echo "<tr><td>//column headers go here</td></tr>";
do {
printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td width='700'>%s</td></tr>",$myrow["rec_id"],$myrow["lead_date"],$myrow["nhm_associate"], $myrow["fname"], $myrow["lname"], $myrow["home_phone"], $myrow["cell_phone"], $myrow["email"], $myrow["remarks"]);
} while ($myrow = mysql_fetch_array($result));
echo "</table></td></tr></table>";
} else {
echo "$ref: That record appears to be unavailable";
}
mysql_free_result($result);
mysql_close($db);
?>-->