ajax - Multiple steps user registration - relation between php session and javascript variables -


i doing in php/mysql user registration in multiple steps. on same page. have declared functions each of step , hold variable of current step (or next if conditions apply) in $_session. keep values each step $_session , @ last step write database.

on last step need work on client side allow user choose few cities in his/her state activate. jquery autocomplete , autocomplete source data taken using ajax/php database (no refresh required). have textbox user add cities , div insert cities selected (allowing option delete them in case of mistake insertion). happening on client side.

i need somehow client side array of cities selected (which includes city_id, city_name , county_name) , put $_session when need write database have in order.

how do it?

only option have in mind right pass js array ajax php file insert session js array. thinking before page submission , allow form submitted, next step step write database.

any other options?

ajax best option

i "on change" , fire off php script store in session.


Comments