display city_name using two tables. I have written two queries but unable to display the results. First Table name is tbl_city and it has id,state_id,city_id,city_name. Other table name is tbl_states and it has id,state_id,state_name $state_id=$_REQUEST['state_id']; $query="select c.city_name FROM tbl_city AS c,tbl_states AS s where c.state_id='$state_id' AND s.state_id='$state_id'";(two tables using alias) $query="select tbl_city.city_name FROM tbl_city INNER JOIN tbl_states ON tbl_states.state_id='$state_id' AND tbl_city.state_id='$state_id'";(using Inner join)

Member Avatar
Member Avatar
+0 forum 2

I am currently working on a membership registration web form, wherein we have to take details of the member being registered online. i need to know his Country, State/Region and City. i am looking for a database/list so that we can provide the same in a combobox in the registration form. the states should on the selection of country ;and the city should change on the selection of state. i tried lot, but only getting list of countries or cities BUT independent not related. Please guide.

Member Avatar
Member Avatar
+0 forum 3

Please help me.I'll really thank for you help! How to write code for country, state and city drop down list menu? change automatically for state and city when country is selected.

Member Avatar
Member Avatar
+0 forum 1

Hi there, I have a Country/City list in my SQL database and access it with PHP using a select element in php. I use the Chosen Jquery Plugin for the styling of these select elements. Now my problem is that i want only the cities of the country selected to display, and i got that right, but then when it loads the city list, it discards the Chosen Style to the select element. To load my City Select data i use the onChange event. here is the code: function getXMLHTTP() { //fuction to return the xml http object var xmlhttp=false; …

Member Avatar
+0 forum 0

Hey there, I am looking to have 2 drop down lists, 1 for provinces and 1 for cities. i saw some examples in java script but since i dont know how to use java and i do know and LOVE php i wondering if anyone can help me with this Thank you,

Member Avatar
Member Avatar
+0 forum 6

I want to get to GameStop and the overall video game market, which finally seems to be losing steam. But tech is going nowhere until we straighten the banking mess out and this week’s earnings report from perhaps the biggest bank out there - Citi – is being falsely touted as a harbinger of a big bank rebound. For the first quarter of 2009, Citi claimed a first-quarter profit of $1.6 billion – which, on the surface, would appear to be good news. But if you include the dividends on the preferred shares that Citi paid the government, it actually …

Member Avatar
+0 forum 0

The End.