I currently have a php file displaying a list of unique VARCHAR items in a table on a SQL server like this:
echo "<b><center>Strain List</center></b><br><br>";
$i=0;
$priorstrain='NULL';
while ($i < $num) {
$strain=mysql_result($result,$i,"Strain");
if ($strain!=$priorstrain) {
echo "<a href=result.php><b>$strain</b></a>";
}
$priorstrain=$strain;
$i++;
}
I would like all items that matches $strain to display on the next page. For example, say the list displays:
CAT DOG MOUSE
and when someone clicks on DOG I want the page to redirect to a page that shows:
STRAIN OWNER DOB COLOR
DOG JOHN 9/9/2015 BROWN
DOG JEFF 10/04/2013 BLACK
What is the best way to accomplish this?
Thanks in advance!