<Original message> From: John Meyer <[EMAIL PROTECTED]> Date: Thu, Aug 30, 2001 at 03:49:57PM -0700 Message-ID: <[EMAIL PROTECTED]> Subject: [PHP] Is there anything in here that could be considered a parse error? > 1 if (empty($DidSurvey[$p_surveyid])) { > 2 if (is_array($p_answers)){ > 3 foreach($p_answers as $value) { > 4 $sql = "INSERT INTO RESULTS(SURVEY_ID, ANSWER_ID) VALUES(" . $p_surveyid . >"," . $value . ");"; > 5 mysql_query($sql); > 6 } > 7 else { </Original message> <Reply> Take a look yourself... Pretty obvious isn't it?! There's some code missing! At least... well... It's not right. You either don't close your foreach() loop which starts at line 3, or you don't close the if() loop which starts at line 2, and you definitely don't close the if() loop which starts at line 1. You probably mean something like: 1 if (empty($DidSurvey[$p_surveyid])) { 2 if (is_array($p_answers)){ 3 foreach($p_answers as $value) { 4 $sql = "INSERT INTO RESULTS(SURVEY_ID, ANSWER_ID) VALUES(" . $p_surveyid . "," . $value . ");"; 5 mysql_query($sql); 6 } 7 } 8 } else { etc. </Reply> -- * R&zE: -- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- «««««««««««««««««««««««« -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]