i still need help if anyone wants to take a look at this,
thanks
Help Me! Plz? Multidimensional Arrays to Email
Moderator: General Moderators
-
dream2rule
- Forum Contributor
- Posts: 109
- Joined: Wed Jun 13, 2007 5:07 am
Re: Help Me! Plz? Multidimensional Arrays to Email
Hi innervate,
i wanted to know where are you storing all the states info?
if its in a database then you can follow this code below..
You can first create a table called states and store all the States therein.
Hopefully this piece of a simple code helps you.
Cheers,
Dream2rule
i wanted to know where are you storing all the states info?
if its in a database then you can follow this code below..
You can first create a table called states and store all the States therein.
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
}
Cheers,
Dream2rule