I have a database of dealers. A web page loads a list of states, a user clicks on the state and the database is queried and lists in a table the dealers for that state. Simple enough. When the dealers page is first loaded, it shows all dealers in the database, name, address, phone, etc. I want to change that to just the dealer names linked to their state listing. I can get the page to display the dealer names okay, but when I try to get the link to work it just reloads the currant page. The url shows the correct information. I shouldn't have to designate a seperate page to show the results should I? I don't want to, I want this to be the default that loads when the page is loaded.
I have this code snippet below, that when I click on the the link in the web page, the url shows the correct info for the page, but it does not load, it just reloads the same current page. Thanks for the help... -- Chip --- lots of elseif statements trimmed -- elseif ($orderby == '46'): $query = "select * from dealers where ID = '46' order by 'DealerName' asc"; else: $query = "select * from dealers"; endif; $result = mysql_query($query); $i = 0; while ( $row = mysql_fetch_array($result)) { if ($result): { printf("<td><a href=\"http://www.mapquest.com/cgi-bin/ia_free?width=500&height=600&level=8&streetaddress=%s&city=%s&state=%s\" target=\"_new\">%s</a> \n", $row["Address1"], $row["City"], $row["State"], $row["DealerName"]); printf("<br>%s\n", $row["Address1"]); printf("<br>%s\n", $row["Address2"]); printf("<br>%s, %s %s\n", $row["City"], $row["State"], $row["Zipcode"]); printf("<br>Phone: %s\n", $row["Phone"]); printf("<br>FAX: %s\n", $row["FAX"]); printf("<br>\n<a href=\"mailto:%s\">%s</a>\n", $row["Email"], $row["Email"]); print("</td>\n"); if ($i % 2) { echo "</tr>\n<tr>\n"; } $i++; } else: printf("<td>".$row["ID"]." <a href='dealerDB2.php?ID=$row[ID]'>%s</a>", $row["DealerName"]); print("</td>"); if ($i % 2) { echo "</tr>\n<tr>\n"; } $i++; endif; } ?> --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php