I'm sure there is a way to code this so I dont have to connect twice. Any ideas?
//Connect for first query
$result = mysql_query("SELECT * FROM links WHERE state = '$state' ORDER BY link_name");
while($row = mysql_fetch_array($result))
{
echo "<a href=".$row['url'].">".$row['link_name']."</a><br>\n";
}
//Connect for second query
$result = mysql_query("SELECT * FROM links WHERE state = '$other' ORDER BY link_name");
while($row = mysql_fetch_array($result))
{
//Change "all_states" to Alabama
$row['state']="al";
echo "<a href=".$row['url'].$row['state'].">".$row['link_name']."</a><br>\n";
}