> Parse error: parse error, expecting `']'' in file.php
>
> I've been working on this script, and can't see why it fails here, but I
> have another page that uses the same coding and it works correctly.
>
> OK, here's the code:
> $cart1 = "";
> $cart1 =
> "'$_POST[nutrition_program_assistant]','$_POST[County]','$_POST[ERS_entry_d
>ate]','$_POST[ERS_exit_date]','$_POST[Group_ID]','$_POST[wname_of_group]','$
>_POST[select]','$_POST[Contact_person]','$_POST[Telephone]','$_POST[Group_Ad
>dress]','$_POST[city]','$_POST[zip]','$_POST[Volunteer_1]','$_POST[Volunteer
>_2]','$_POST[Volunteer_3]','$_POST[Volunteer_4]','$_POST[Program_start_date]
>','$_POST[Projected_end_date]','$_POST[Actual_end_date]','$_POST[Eval_Pre_te
>st]','$_POST[Eval_post_test]','$_POST[number_meetings]','$_POST[number_conta
>ct_hours]','$_POST[wname_1]','$_POST[sex_1]','$_POST[race_1]','$_POST[res_1]
>','$_POST[bday_mo_1]','$_POST[bday_day_1]','$_POST[bday_yr_1]','$_POST[grade
>_1]','$_POST[4_h_1]','$_POST[wname_2]','$_POST[sex_2]','$_POST[race_2]','$_P
>OST[res_2]','$_POST[bday_mo_2]','$_POST[bday_day_2]','$_POST[bday_yr_2]','$_
>POST[grade_2]','$_POST[4_h_2]','$_POST[wname_3]','$_POST[sex_3]','$_POST[rac
>e_3]','$_POST[res_3]','$_POST[bday_mo_3]','$_POST[bday_day_3]','$_POST[bday_
>yr
> _3]','$_POST[grade_3]','$_POST[4_h_3]','$_POST[wname_4]','$_POST[sex_4]','$
>_POST[race_4]','$_POST[res_4]','$_POST[bday_mo_4]','$_POST[bday_day_4]','$_P
>OST[bday_yr_4]','$_POST[grade_4]','$_POST[4_h_4]','$_POST[wname_5]','$_POST[
>sex_5]','$_POST[race_5]','$_POST[res_5]','$_POST[bday_mo_5]','$_POST[bday_da
>y_5]','$_POST[bday_yr_5]','$_POST[grade_5]','$_POST[4_h_5]','$_POST[wname_6]
>','$_POST[sex_6]','$_POST[race_6]','$_POST[res_6]','$_POST[bday_mo_6]','$_PO
>ST[bday_day_6]','$_POST[bday_yr_6]'"; $cart2 = "";
> $cart2 =
> "'$_POST[grade_6]','$_POST[4_h_6]','$_POST[wname_7]','$_POST[sex_7]','$_POS
>T[race_7]','$_POST[res_7]','$_POST[bday_mo_7]','$_POST[bday_day_7]','$_POST[
>bday_yr_7]','$_POST[grade_7]','$_POST[4_h_7]','$_POST[wname_8]','$_POST[sex_
>8]','$_POST[race_8]','$_POST[res_8]','$_POST[bday_mo_8]','$_POST[bday_day_8]
>','$_POST[bday_yr_8]','$_POST[grade_8]','$_POST[4_h_8]','$_POST[wname_9]','$
>_POST[sex_9]','$_POST[race_9]','$_POST[res_9]','$_POST[bday_mo_9]','$_POST[b
>day_day_9]','$_POST[bday_yr_9]','$_POST[grade_9]','$_POST[4_h_9]','$_POST[wn
>ame_10]','$_POST[sex_10]','$_POST[race_10]','$_POST[res_10]','$_POST[bday_mo
>_10]','$_POST[bday_day_10]','$_POST[bday_yr_10]','$_POST[grade_10]','$_POST[
>4_h_10]','$_POST[Attend_1_1]','$_POST[Attend_2_1]','$_POST[Attend_3_1]','$_P
>OST[Attend_4_1]','$_POST[Attend_5_1]','$_POST[Attend_6_1]','$_POST[Attend_7_
>1]','$_POST[Attend_8_1]','$_POST[Attend_9_1]','$_POST[Attend_10_1]','$_POST[
>Attend_1_2]','$_POST[Attend_2_2]','$_POST[Attend_3_2]','$_POST[Attend_4_2]',
>'$
> _POST[Attend_5_2]','$_POST[Attend_6_2]','$_POST[Attend_7_2]','$_POST[Attend
>_8_2]','$_POST[Attend_9_2]','$_POST[Attend_10_2]','$_POST[Attend_1_3]','$_PO
>ST[Attend_2_3]','$_POST[Attend_3_3]','$_POST[Attend_4_3]','$_POST[Attend_5_3
>]','$_POST[Attend_6_3]','$_POST[Attend_7_3]','$_POST[Attend_8_3]','$_POST[At
>tend_9_3]','$_POST[Attend_10_3]','$_POST[Attend_1_4]','$_POST[Attend_2_4]','
>$_POST[Attend_3_4]','$_POST[Attend_4_4]','$_POST[Attend_5_4]','$_POST[Attend
>_6_4]','$_POST[Attend_7_4]','$_POST[Attend_8_4]','$_POST[Attend_9_4]','$_POS
>T[Attend_10_4]','$_POST[Attend_1_5]','$_POST[Attend_2_5]','$_POST[Attend_3_5
>]','$_POST[Attend_4_5]','$_POST[Attend_5_5]','$_POST[Attend_6_5]','$_POST[At
>tend_7_5]','$_POST[Attend_8_5]','$_POST[Attend_9_5]','$_POST[Attend_10_5]','
>$_POST[Attend_1_6]','$_POST[Attend_2_6]','$_POST[Attend_3_6]','$_POST[Attend
>_4_6]','$_POST[Attend_5_6]','$_POST[Attend_6_6]','$_POST[Attend_7_6]','$_POS
>T[Attend_8_6]','$_POST[Attend_9_6]','$_POST[Attend_10_6]','$_POST[Attend_1_7
>]',
> '$_POST[Attend_2_7]','$_POST[Attend_3_7]','$_POST[Attend_4_7]','$_POST[Atte
>nd_5_7]','$_POST[Attend_6_7]','$_POST[Attend_7_7]','$_POST[Attend_8_7]','$_P
>OST[Attend_9_7]','$_POST[Attend_10_7]','$_POST[Attend_1_8]','$_POST[Attend_2
>_8]','$_POST[Attend_3_8]','$_POST[Attend_4_8]','$_POST[Attend_5_8]','$_POST[
>Attend_6_8]','$_POST[Attend_7_8]','$_POST[Attend_8_8]','$_POST[Attend_9_8]',
>'$_POST[Attend_10_8]','$_POST[Attend_1_9]','$_POST[Attend_2_9]','$_POST[Atte
>nd_3_9]','$_POST[Attend_4_9]','$_POST[Attend_5_9]','$_POST[Attend_6_9]','$_P
>OST[Attend_7_9]','$_POST[Attend_8_9]','$_POST[Attend_9_9]','$_POST[Attend_10
>_9]','$_POST[Attend_1_10]','$_POST[Attend_2_10]','$_POST[Attend_3_10]','$_PO
>ST[Attend_4_10]','$_POST[Attend_5_10]','$_POST[Attend_6_10]','$_POST[Attend_
>7_10]','$_POST[Attend_8_10]','$_POST[Attend_9_10]','$_POST[Attend_10_10]','$
>_POST[TE_CT_1]','$_POST[TE_CTL_1]','$_POST[TE_CT_2]','$_POST[TE_CTL_2]','$_P
>OST[TE_CT_3]','$_POST[TE_CTL_3]','$_POST[TE_D_1]','$_POST[TE_LT_1]','$_POST[
>TE_ A_1]','$_POST[TE_FA_1]','$_POST[TE_H_1]'";
> $cart3 = "";
> $cart3 =
> "'$_POST[TE_D_2]','$_POST[TE_LT_2]','$_POST[TE_A_2]','$_POST[TE_FA_2]','$_P
>OST[TE_H_2]','$_POST[TE_D_3]','$_POST[TE_LT_3]','$_POST[TE_A_3]','$_POST[TE_
>FA_3]','$_POST[TE_H_3]','$_POST[TE_D_4]','$_POST[TE_LT_4]','$_POST[TE_A_4]',
>'$_POST[TE_FA_4]','$_POST[TE_H_4]','$_POST[TE_D_5]','$_POST[TE_LT_5]','$_POS
>T[TE_A_5]','$_POST[TE_FA_5]','$_POST[TE_H_5]','$_POST[TE_D_6]','$_POST[TE_LT
>_6]','$_POST[TE_A_6]','$_POST[TE_FA_6]','$_POST[TE_H_6]','$_POST[TE_D_7]','$
>_POST[TE_LT_7]','$_POST[TE_A_7]','$_POST[TE_FA_7]','$_POST[TE_H_7]','$_POST[
>TE_D_8]','$_POST[TE_LT_8]','$_POST[TE_A_8]','$_POST[TE_FA_8]','$_POST[TE_H_8
>]','$_POST[TE_D_9]','$_POST[TE_LT_9]','$_POST[TE_A_9]','$_POST[TE_FA_9]','$_
>POST[TE_H_9]','$_POST[TE_D_10]','$_POST[TE_LT_10]','$_POST[TE_A_10]','$_POST
>[TE_FA_10]','$_POST[TE_H_10]','$_POST[TE_C]'";
>
> $addtocart = "insert into efnep_form
> values('',".$cart1.",".$cart2.",".$cart3.")"; echo $addtocart;
>
>
> And the error I get is showing up on the $cart1 = "' line of code
>
> Any suggestions?
>
> Thanks,
> Robert
>
> --
> Robert Sossomon, Business and Technology Application Technician
> 4-H Youth Development Department
> 200 Ricks Hall, Campus Box 7606
> N.C. State University
> Raleigh NC 27695-7606
> Phone: 919/515-8474
> Fax:   919/515-7812
> [EMAIL PROTECTED]

how about formating the code dude... ?

Here is the correction....

<?php
$cart1 = "";
$cart1 = "
'" . $_POST['nutrition_program_assistant'] . "',
'" . $_POST['County'] . "',
'" . $_POST['ERS_entry_date'] . "',
'" . $_POST['ERS_exit_date'] . "',
'" . $_POST['Group_ID'] . "',
'" . $_POST['wname_of_group'] . "',
'" . $_POST['select'] . "',
'" . $_POST['Contact_person'] . "',
'" . $_POST['Telephone'] . "',
'" . $_POST['Group_Address'] . "',
'" . $_POST['city'] . "',
'" . $_POST['zip'] . "',
'" . $_POST['Volunteer_1'] . "',
'" . $_POST['Volunteer_2'] . "',
'" . $_POST['Volunteer_3'] . "',
'" . $_POST['Volunteer_4'] . "',
'" . $_POST['Program_start_date'] . "',
'" . $_POST['Projected_end_date'] . "',
'" . $_POST['Actual_end_date'] . "',
'" . $_POST['Eval_Pre_test'] . "',
'" . $_POST['Eval_post_test'] . "',
'" . $_POST['number_meetings'] . "',
'" . $_POST['number_contact_hours'] . "',
'" . $_POST['wname_1'] . "',
'" . $_POST['sex_1'] . "',
'" . $_POST['race_1'] . "',
'" . $_POST['res_1'] . "',
'" . $_POST['bday_mo_1'] . "',
'" . $_POST['bday_day_1'] . "',
'" . $_POST['bday_yr_1'] . "',
'" . $_POST['grade_1'] . "',
'" . $_POST['4_h_1'] . "',
'" . $_POST['wname_2'] . "',
'" . $_POST['sex_2'] . "',
'" . $_POST['race_2'] . "',
'" . $_POST['res_2'] . "',
'" . $_POST['bday_mo_2'] . "',
'" . $_POST['bday_day_2'] . "',
'" . $_POST['bday_yr_2'] . "',
'" . $_POST['grade_2'] . "',
'" . $_POST['4_h_2'] . "',
'" . $_POST['wname_3'] . "',
'" . $_POST['sex_3'] . "',
'" . $_POST['race_3'] . "',
'" . $_POST['res_3'] . "',
'" . $_POST['bday_mo_3'] . "',
'" . $_POST['bday_day_3'] . "',
'" . $_POST['bday_yr_3'] . "',
'" . $_POST['grade_3'] . "',
'" . $_POST['4_h_3'] . "',
'" . $_POST['wname_4'] . "',
'" . $_POST['sex_4'] . "',
'" . $_POST['race_4'] . "',
'" . $_POST['res_4'] . "',
'" . $_POST['bday_mo_4'] . "',
'" . $_POST['bday_day_4'] . "',
'" . $_POST['bday_yr_4'] . "',
'" . $_POST['grade_4'] . "',
'" . $_POST['4_h_4'] . "',
'" . $_POST['wname_5'] . "',
'" . $_POST['sex_5'] . "',
'" . $_POST['race_5'] . "',
'" . $_POST['res_5'] . "',
'" . $_POST['bday_mo_5'] . "',
'" . $_POST['bday_day_5'] . "',
'" . $_POST['bday_yr_5'] . "',
'" . $_POST['grade_5'] . "',
'" . $_POST['4_h_5'] . "',
'" . $_POST['wname_6'] . "',
'" . $_POST['sex_6'] . "',
'" . $_POST['race_6'] . "',
'" . $_POST['res_6'] . "',
'" . $_POST['bday_mo_6'] . "',
'" . $_POST['bday_day_6'] . "',
'" . $_POST['bday_yr_6'] . "'";
$cart2 = "";
$cart2 = "'" . $_POST['grade_6'] . "','" . $_POST['4_h_6'] . "','" . 
$_POST['wname_7'] . "','" . $_POST['sex_7'] . "','" . $_POST['race_7'] . 
"','" . $_POST['res_7'] . "','" . $_POST['bday_mo_7'] . "','" . 
$_POST['bday_day_7'] . "','" . $_POST['bday_yr_7'] . "','" . 
$_POST['grade_7'] . "','" . $_POST['4_h_7'] . "','" . $_POST['wname_8'] . 
"','" . $_POST['sex_8'] . "','" . $_POST['race_8'] . "','" . 
$_POST['res_8'] . "','" . $_POST['bday_mo_8'] . "','" . 
$_POST['bday_day_8'] . "','" . $_POST['bday_yr_8'] . "','" . 
$_POST['grade_8'] . "','" . $_POST['4_h_8'] . "','" . $_POST['wname_9'] . 
"','" . $_POST['sex_9'] . "','" . $_POST['race_9'] . "','" . 
$_POST['res_9'] . "','" . $_POST['bday_mo_9'] . "','" . 
$_POST['bday_day_9'] . "','" . $_POST['bday_yr_9'] . "','" . 
$_POST['grade_9'] . "','" . $_POST['4_h_9'] . "','" . $_POST['wname_10'] . 
"','" . $_POST['sex_10'] . "','" . $_POST['race_10'] . "','" . 
$_POST['res_10'] . "','" . $_POST['bday_mo_10'] . "','" . 
$_POST['bday_day_10'] . "','" . $_POST['bday_yr_10'] . "','" . 
$_POST['grade_10'] . "','" . $_POST['4_h_10'] . "','" . 
$_POST['Attend_1_1'] . "','" . $_POST['Attend_2_1'] . "','" . 
$_POST['Attend_3_1'] . "','" . $_POST['Attend_4_1'] . "','" . 
$_POST['Attend_5_1'] . "','" . $_POST['Attend_6_1'] . "','" . 
$_POST['Attend_7_1'] . "','" . $_POST['Attend_8_1'] . "','" . 
$_POST['Attend_9_1'] . "','" . $_POST['Attend_10_1'] . "','" . 
$_POST['Attend_1_2'] . "','" . $_POST['Attend_2_2'] . "','" . 
$_POST['Attend_3_2'] . "','" . $_POST['Attend_4_2'] . "','" . 
$_POST['Attend_5_2'] . "','" . $_POST['Attend_6_2'] . "','" . 
$_POST['Attend_7_2'] . "','" . $_POST['Attend_8_2'] . "','" . 
$_POST['Attend_9_2'] . "','" . $_POST['Attend_10_2'] . "','" . 
$_POST['Attend_1_3'] . "','" . $_POST['Attend_2_3'] . "','" . 
$_POST['Attend_3_3'] . "','" . $_POST['Attend_4_3'] . "','" . 
$_POST['Attend_5_3'] . "','" . $_POST['Attend_6_3'] . "','" . 
$_POST['Attend_7_3'] . "','" . $_POST['Attend_8_3'] . "','" . 
$_POST['Attend_9_3'] . "','" . $_POST['Attend_10_3'] . "','" . 
$_POST['Attend_1_4'] . "','" . $_POST['Attend_2_4'] . "','" . 
$_POST['Attend_3_4'] . "','" . $_POST['Attend_4_4'] . "','" . 
$_POST['Attend_5_4'] . "','" . $_POST['Attend_6_4'] . "','" . 
$_POST['Attend_7_4'] . "','" . $_POST['Attend_8_4'] . "','" . 
$_POST['Attend_9_4'] . "','" . $_POST['Attend_10_4'] . "','" . 
$_POST['Attend_1_5'] . "','" . $_POST['Attend_2_5'] . "','" . 
$_POST['Attend_3_5'] . "','" . $_POST['Attend_4_5'] . "','" . 
$_POST['Attend_5_5'] . "','" . $_POST['Attend_6_5'] . "','" . 
$_POST['Attend_7_5'] . "','" . $_POST['Attend_8_5'] . "','" . 
$_POST['Attend_9_5'] . "','" . $_POST['Attend_10_5'] . "','" . 
$_POST['Attend_1_6'] . "','" . $_POST['Attend_2_6'] . "','" . 
$_POST['Attend_3_6'] . "','" . $_POST['Attend_4_6'] . "','" . 
$_POST['Attend_5_6'] . "','" . $_POST['Attend_6_6'] . "','" . 
$_POST['Attend_7_6'] . "','" . $_POST['Attend_8_6'] . "','" . 
$_POST['Attend_9_6'] . "','" . $_POST['Attend_10_6'] . "','" . 
$_POST['Attend_1_7'] . "','" . $_POST['Attend_2_7'] . "','" . 
$_POST['Attend_3_7'] . "','" . $_POST['Attend_4_7'] . "','" . 
$_POST['Attend_5_7'] . "','" . $_POST['Attend_6_7'] . "','" . 
$_POST['Attend_7_7'] . "','" . $_POST['Attend_8_7'] . "','" . 
$_POST['Attend_9_7'] . "','" . $_POST['Attend_10_7'] . "','" . 
$_POST['Attend_1_8'] . "','" . $_POST['Attend_2_8'] . "','" . 
$_POST['Attend_3_8'] . "','" . $_POST['Attend_4_8'] . "','" . 
$_POST['Attend_5_8'] . "','" . $_POST['Attend_6_8'] . "','" . 
$_POST['Attend_7_8'] . "','" . $_POST['Attend_8_8'] . "','" . 
$_POST['Attend_9_8'] . "','" . $_POST['Attend_10_8'] . "','" . 
$_POST['Attend_1_9'] . "','" . $_POST['Attend_2_9'] . "','" . 
$_POST['Attend_3_9'] . "','" . $_POST['Attend_4_9'] . "','" . 
$_POST['Attend_5_9'] . "','" . $_POST['Attend_6_9'] . "','" . 
$_POST['Attend_7_9'] . "','" . $_POST['Attend_8_9'] . "','" . 
$_POST['Attend_9_9'] . "','" . $_POST['Attend_10_9'] . "','" . 
$_POST['Attend_1_10'] . "','" . $_POST['Attend_2_10'] . "','" . 
$_POST['Attend_3_10'] . "','" . $_POST['Attend_4_10'] . "','" . 
$_POST['Attend_5_10'] . "','" . $_POST['Attend_6_10'] . "','" . 
$_POST['Attend_7_10'] . "','" . $_POST['Attend_8_10'] . "','" . 
$_POST['Attend_9_10'] . "','" . $_POST['Attend_10_10'] . "','" . 
$_POST['TE_CT_1'] . "','" . $_POST['TE_CTL_1'] . "','" . $_POST['TE_CT_2'] . 
"','" . $_POST['TE_CTL_2'] . "','" . $_POST['TE_CT_3'] . "','" . 
$_POST['TE_CTL_3'] . "','" . $_POST['TE_D_1'] . "','" . $_POST['TE_LT_1'] . 
"','" . $_POST['TE_A_1'] . "','" . $_POST['TE_FA_1'] . "','" . 
$_POST['TE_H_1'] . "'";
$cart3 = "";
$cart3 = "'" . $_POST['TE_D_2'] . "','" . $_POST['TE_LT_2'] . "','" . 
$_POST['TE_A_2'] . "','" . $_POST['TE_FA_2'] . "','" . $_POST['TE_H_2'] . 
"','" . $_POST['TE_D_3'] . "','" . $_POST['TE_LT_3'] . "','" . 
$_POST['TE_A_3'] . "','" . $_POST['TE_FA_3'] . "','" . $_POST['TE_H_3'] . 
"','" . $_POST['TE_D_4'] . "','" . $_POST['TE_LT_4'] . "','" . 
$_POST['TE_A_4'] . "','" . $_POST['TE_FA_4'] . "','" . $_POST['TE_H_4'] . 
"','" . $_POST['TE_D_5'] . "','" . $_POST['TE_LT_5'] . "','" . 
$_POST['TE_A_5'] . "','" . $_POST['TE_FA_5'] . "','" . $_POST['TE_H_5'] . 
"','" . $_POST['TE_D_6'] . "','" . $_POST['TE_LT_6'] . "','" . 
$_POST['TE_A_6'] . "','" . $_POST['TE_FA_6'] . "','" . $_POST['TE_H_6'] . 
"','" . $_POST['TE_D_7'] . "','" . $_POST['TE_LT_7'] . "','" . 
$_POST['TE_A_7'] . "','" . $_POST['TE_FA_7'] . "','" . $_POST['TE_H_7'] . 
"','" . $_POST['TE_D_8'] . "','" . $_POST['TE_LT_8'] . "','" . 
$_POST['TE_A_8'] . "','" . $_POST['TE_FA_8'] . "','" . $_POST['TE_H_8'] . 
"','" . $_POST['TE_D_9'] . "','" . $_POST['TE_LT_9'] . "','" . 
$_POST['TE_A_9'] . "','" . $_POST['TE_FA_9'] . "','" . $_POST['TE_H_9'] . 
"','" . $_POST['TE_D_10'] . "','" . $_POST['TE_LT_10'] . "','" . 
$_POST['TE_A_10'] . "','" . $_POST['TE_FA_10'] . "','" . $_POST['TE_H_10'] . 
"','" . $_POST['TE_C'] . "'";

$addtocart = "insert into efnep_form values('',".$cart1.",".$cart2.",".
$cart3.")";
echo $addtocart;

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to