Safest way to do a dynamic drop down?

Ask about a PHP problem here.
Post Reply
pikerslayer
Posts: 2
Joined: Sun Jul 31, 2011 3:53 am

Safest way to do a dynamic drop down?

Post by pikerslayer »

Is the only way to make a changeable county with cities using javascript?
Or would it be fine as long as it's validated ?
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Safest way to do a dynamic drop down?

Post by jacek »

If you mean that when the user picks a country the list of cities is populated, then yes. The only way to get that effect is by using JavaScript. And it should be fine as long as you make sure that whatever is submitted is in the list of possible options, or if you don't want to be that strict you can just make sure that the data is sanitized properly before being inserted.
Image
Post Reply