hi to all i need small help in php. how to store multi select box values in database.suppose one person prefers 2 or 3 cities in a country.during the normal process last selected value is stored in database.but i want to store all selected values in multiple select box. thanks in advance..
Add these brackets [] to your HTML form. Behind the checkbox name, to be exact. <input type="checkbox" name="foo[]" /> HTML: This will convert the the variable foo into an array, and you can receive all values in your PHP script. print_r($_POST['foo']); PHP: