Re: Help Me! Plz? Multidimensional Arrays to Email
Posted: Mon Feb 18, 2008 3:59 pm
i still need help if anyone wants to take a look at this,
thanks
thanks
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
//sql query to retrieve states from the db
$sql_1 = "SELECT distinct(states) FROM states";
$rs_1 = mysql_query($sql_1);
//retrieving multiple checkboxes info
$checked_states_list = "";
while($state_names = mysql_fetch_array($rs_1))
{
$states_1 = $state_names[0];
$selected_states = $_POST[$states_1];
if($selected_states == "on")
$checked_states_list = $checked_states_list .$states_1 .", "; //this would append all the checked States separated by a comma
}