I’ve been searching google to find the code, but I can’t find it. What I want to do is pretty simple, but I’m not php expert.
I want to insert multiple cities’ name in a single press of submit button (if that is possible)
I have created a database with 2 tables: ‘cities’ and ‘states’
and I have populated the states table
so I need two fields or boxes, one is for states, which is drop down ‘select’ box which already filled with states name, pulled from the database,
the other one is a cities field which a text type field (type=”text”).
I want to be able to type in multiple cities name, probably separated with ‘,’ a comma,
and with a single press of submit button, all the value will be inserted into mysql cities table and go on to the next state.
I know I need to create some sort of loop, but I have no idea how to do it.
*index.php (html):
*save.php:
}
?>