Hey everyone. Still trying to get php down. I have a database that contains states, cities, zip codes, and counties. What I am trying to do is get it so when you first load it lists out the states in the database as links, like
www.domain.com/index.php?state=[ST] The states are listed more than once in the db (each row has city info) so is there a way to filter duplicates?
Also, after the state has been set, I am trying to pull a list of cities that match the state like this:
$sql = 'SELECT * FROM zips WHERE state = "$state";';
It doesn’t seem to like it for some reason. Are the queries case sensitive? Maybe I’m not creating an array to store the city info correctly. Any ideas?
Thanks!
www.domain.com/index.php?state=[ST] The states are listed more than once in the db (each row has city info) so is there a way to filter duplicates?
Also, after the state has been set, I am trying to pull a list of cities that match the state like this:
$sql = 'SELECT * FROM zips WHERE state = "$state";';
It doesn’t seem to like it for some reason. Are the queries case sensitive? Maybe I’m not creating an array to store the city info correctly. Any ideas?
Thanks!