Hello, in a classified site with PHP and MySQL I made through Ajax the insertion of the state and the city. When selecting the state, the id
is passed and it sends to the file getcidade.php that makes the select
and returns the respective city, thus inserting the ID's in the database.
TABELA tb_estado CAMPOS id|int e uf|varchar(2)
TABELA tb_cidade CAMPOS id|int e id_estado_fk|int e cidade|varchar(100)
But now in the bank is id
state 26 and city 4773 how to display the state name SP and the city Bauru?
NOTE * I already do INNER JOIN
with the id of the user to display the city / state that the guy has registered, but stays in the advertisement.
TABELA tb_anuncio CAMPOS id|int e id_usuario_fk|int e estado_fk|int(10) e cidade_fk|int(10)
On the page it looks like this: inserted on: 23/08 Location: 4773/26
How can I get the names in the table?