Thread: cgi script
View Single Post
Old 12-30-2002, 06:54 AM   #26 (permalink)
Henry
Registered User
 
Join Date: Dec 2002
Location: Chicago
Posts: 13
Henry is on a distinguished road
parse error

I tried two alteratioins to the script, 1) placed insert statements on separate lines, 2) removewd thge underescores in the insert statements. but I still get errors. Is trhere any chance that the server expects every field to be filled? Would someone take another look at this script and point out some possible issues. Thanks.

<?php
if ($submit="submit") {//"submit"
$hostname = "";
$username = "";
$password = "";
$databasename = "";

$link = mysql_connect ($hostname, $username, $password);
mysql_select_db ($ReligionSurvey, $link);

$stmt = "insert_into_Results2003 (country, citizen, state, resident, community, age, gender, ethnicity, other_ethnicity)";
$stmt = "insert_into_Results2003 (religious_orientation, other_religious_orientation, student, student_status, employed)";
$stmt = "insert_into_Results2003 (occupation, faith_events, faith_events_attendance, other_faith_events_attendance)";
$stmt = "insert_into_Results2003 (faith_events_occurrence, faith_events_occurrence_dates)";
$stmt = "insert_into_Results2003 (place_of_worship, place_of_worship_name, live_near_place_of_worship, religious_holiday)";
$stmt = "insert_into_Results2003 (religious_symbols, religious_symbols_name, mothers_faith, fathers_faith, mother_same_faith)";
$stmt = "insert_into_Results2003 (father_same_faith, same_religion_as_growing_up, attended_religious_institution)";
$stmt = "insert_into_Results2003 (religious_institution_level, religious_institution_type, grandparents_faith)";
$stmt = "insert_into_Results2003 (religion_dictates_appearance, appearance_dictated_by_doctrine)";
$stmt = "insert_into_Results2003 (forbid_specific_clothing_women, forbid_specific_clothing_men, forbidden_appearance)";
$stmt = "insert_into_Results2003 (specific_consumption_forbidden, consumption_forbidden, community_religious_orientation)";
$stmt = "insert_into_Results2003 (other_community_religious_orientation, community_places_of_worship)";
$stmt = "insert_into_Results2003 (community_pow_affiliation, religious_symbols_in_community)";
$stmt = "insert_into_Results2003 (community_religious_symbol_affiliation, are_your_religious_holidays_observed_public_school s)";
$stmt = "insert_into_Results2003 (are_your_religious_holidays_observed_businesses)" ;
$stmt = "insert_into_Results2003 (are_your_religious_holidays_observed_local_govern ment, local_officials_same_religion)";
$stmt = "insert_into_Results2003 (state_officials_same_religion, national_officials_same_religion, community_attitude_beliefs)";
$stmt = "insert_into_Results2003 (community_attitude_pow, community_attitude_symbols, attitude_holidays_publicschools)";
$stmt = "insert_into_Results2003 (attituder_holidays_businesses, attitude_religious_holidays_localgovernment)";
$stmt = "insert_into_Results2003 (community_attitude_electedofficials, attitude_toward_religion_dominant_in_your_communit y)";
$stmt = "insert_into_Results2003 (publicschools_consider_dietary_needs, restaurants_cater_dietary_needs)";
$stmt = "insert_into_Results2003 (familiar_other_religions, familiar_other_religion_name, interested_other_religions)";
$stmt = "insert_into_Results2003 (interested_other_religion_name, attended_events_affiliated_religion)";
$stmt = "insert_into_Results2003 (attended_eventr_religion_name, consider_religion_political_candidates, broadcasts_religion)";
$stmt = "insert_into_Results2003 (reflect_ideals, offend_you_religious_reasons, broadcasts_religious_issues)";
$stmt = "insert_into_Results2003 (interest_religious_beliefs, community_pow_variety_religions)";
$stmt = "insert_into_Results2003 (community_recognition_religios_holidays, broadcasts_sensitive_variety_religions)";
$stmt = "insert_into_Results2003 (respondent_email, respondent_comments)";
$stmt = "insert_into_Results2003 values ('$country', '$citizen', '$state', '$resident', '$community', '$age', '$gender', '$ethnicity')";
$stmt = "insert_into_Results2003 values ('$other_ethnicity', '$religious_orientation', '$other_religious_orientation', '$student')";
$stmt = "insert_into_Results2003 values ('$student_status', '$employed', '$occupation', '$faith_events', '$faith_events_attendance')";
$stmt = "insert_into_Results2003 values ('$other_faith_events_attendance', '$faith_events_occurrence')";
$stmt = "insert_into_Results2003 values ('$faith_events_occurrence_dates', '$place_of_worship', '$place_of_worship_name')";
$stmt = "insert_into_Results2003 values ('$live_near_place_of_worship', '$religious_holiday', '$religious_symbols')";
$stmt = "insert_into_Results2003 values ('$religious_symbols_name', '$mothers_faith', '$fathers_faith', '$mother_same_faith')";
$stmt = "insert_into_Results2003 values ('$father_same_faith', '$same_religion_as_growing_up', '$attended_religious_institution')";
$stmt = "insert_into_Results2003 values ('$religious_institution_level', '$religious_institution_type', '$grandparents_faith')";
$stmt = "insert_into_Results2003 values ('$religion_dictates_appearance', '$appearance_dictated_by_doctrine')";
$stmt = "insert_into_Results2003 values ('$forbid_specific_clothing_women', '$forbid_specific_clothing_men')";
$stmt = "insert_into_Results2003 values ('$forbidden_appearance', '$specific_consumption_forbidden', '$consumption_forbidden')";
$stmt = "insert_into_Results2003 values ('$community_religious_orientation', '$other_community_religious_orientation')";
$stmt = "insert_into_Results2003 values ('$community_places_of_worship', '$community_pow_affiliation')";
$stmt = "insert_into_Results2003 values ('$religious_symbols_in_community', '$community_religious_symbol_affiliation')";
$stmt = "insert_into_Results2003 values ('$are_your_religious_holidays_observed_public_sch ools')";
$stmt = "insert_into_Results2003 values ('$are_your_religious_holidays_observed_businesses ')";
$stmt = "insert_into_Results2003 values ('$are_your_religious_holidays_observed_local_gove rnment')";
$stmt = "insert_into_Results2003 values ('$local_officials_same_religion', '$state_officials_same_religion')";
$stmt = "insert_into_Results2003 values ('$national_officials_same_religion', '$community_attitude_beliefs')";
$stmt = "insert_into_Results2003 values ('$community_attitude_pow', '$community_attitude_symbols')";
$stmt = "insert_into_Results2003 values ('$attitude_holidays_publicschools', '$attituder_holidays_businesses')";
$stmt = "insert_into_Results2003 values ('$attitude_religious_holidays_localgovernment', '$community_attitude_electedofficials')";
$stmt = "insert_into_Results2003 values ('$attitude_toward_religion_dominant_in_your_commu nity')";
$stmt = "insert_into_Results2003 values ('$publicschools_consider_dietary_needs', '$restaurants_cater_dietary_needs')";
$stmt = "insert_into_Results2003 values ('$familiar_other_religions', '$familiar_other_religion_name', '$interested_other_religions')";
$stmt = "insert_into_Results2003 values ('$interested_other_religion_name', '$attended_events_affiliated_religion')";
$stmt = "insert_into_Results2003 values ('$attended_eventr_religion_name', '$consider_religion_political_candidates')";
$stmt = "insert_into_Results2003 values ('$broadcasts_religion', '$reflect_ideals, offend_you_religious_reasons')";
$stmt = "insert_into_Results2003 values ('$broadcasts_religious_issues, interest_religious_beliefs')";
$stmt = "insert_into_Results2003 values ('$community_pow_variety_religions', '$community_recognition_religios_holidays')";
$stmt = "insert_into_Results2003 values ('$broadcasts_sensitive_variety_religions, $respondent_email', '$respondent_comments')";

mysql_bd_query ($ReligionSurvey, $stmt);
unset ($avail);

header ("location: survey.php");
exit();
} else {
echo "It seems that you were brought to this page by accident, please return to"; ?>
<A HREF="http://thirdunitarianchurch.org/Community%20Religious%20Climate%20Survey.html">Rel igious Climate Survey</A>
Henry is offline   Reply With Quote