Working off the original file you posted you need to make these changes:
1. The query for rsListOfZipcodes needs to be changed like so:
$query_rsListOfZipcodes = "SELECT cityStatZip_tbl.zip, cityStatZip_tbl.city FROM cityStatZip_tbl ORDER BY cityStatZip_tbl.city";
2. Select the Create Dynamic Array (rsListOfCities) entry in the Server Behaviours Panel and change the entries as follows:
Parent ID field: statename
Child ID field: statename
Child Text field: city
3. Select the Create Dynamic Array (rsListOfZipcodes) entry in the Server Behaviours Panel and change the entries as follows:
Parent ID field: city
Child ID field: city
Child Text field: zip
I would also using Group By rather than SELECT DISTINCT in you other recordsets like so:
$query_rsStates = "SELECT cityStatZip_tbl.statename FROM cityStatZip_tbl GROUP BY cityStatZip_tbl.statename ORDER BY cityStatZip_tbl.statename";
$query_rsListOfCities = "SELECT cityStatZip_tbl.city, cityStatZip_tbl.statename FROM cityStatZip_tbl GROUP BY cityStatZip_tbl.city ORDER BY cityStatZip_tbl.city";
That should get you going.