function get_post_array($which) {
global $HTTP_POST_VARS;
return $HTTP_POST_VARS[$which];
}
function a_signup_2() {
global $HTTP_POST_VARS;
$this->header();
$profiles = $this->get_post_array('profiles');
$dob = mktime(0,0,0,$profiles['dob'][0],$profiles['dob'][1],$profiles['dob'][2]);
unset($profiles['dob']);
$profiles['dob'] = $dob;
$grad_date = mktime(0,0,0,$profiles['grad_date'][0],$profiles['grad_date'][1],$profiles['grad_date'][2]);
unset($profiles['grad_date']);
$profiles['grad_date'] = $grad_date;
$profiles['user_id'] = $this->db_last_insert_id();
$qry = $this->build_insert('profiles',$profiles);
//This is where I need help
$affiliation = implode(',',$profiles['affiliation']);
$this->footer();
}
Here is the output of print_r($_POST)
Array
(
[users] => Array
(
[user_name] =>
[user_password] =>
)
[profiles] => Array
(
[name] =>
[dob] => Array
(
[0] => 1
[1] => 1
[2] => 1960
)
[mailing_address] =>
[parental_contact] =>
[college_year] => Freshman
[major] =>
[transfer_student] => 0
[grad_student] => 0
[grad_date] => Array
(
[0] => 1
[1] => 1
[2] => 1960
)
[afilliation] => Array
(
[0] => Reform
[1] => Conservative
[2] => Orthodox
[3] => Reconstructionist
)
[past_involvement] => Array
(
[0] => None
[1] => Jewish Camps
[2] => Youth Groups
[3] => Jewish Day School
[4] => Trips to Israel
)
)
[Submit] => Continue >>
)
Additional note : I have a date select box that uses the same form name "profiles[date][]" (month is in profiles[date][0] etc.)
and it works fine.. that's weird. Maybe it has something to do with the fact that it is MULTIPLE?