\n
\n
    \n"; $i=0; while ($req[$i]) { $errors = $errors + "
  • $req[$i]\n"; $i++; } $errors = $errors + "
\n
\n"; } if ($email) { $testemail = exec("../cgi-local/validateemail.cgi '$email'"); if (!$testemail) { $errors = $errors + "Invalid email address format.\n"; } } if (!$errors) { $now = Date("Y-m-d h:m:s"); /* if country code chosen, we know it's not USA or Canada, otherwise they would've chosen a state/province-country. */ /* so, we'll need to create a State record with a blank description and this country code (unless it already exists) */ if ($otherCountryID) { $sql = "select stateID from State where state='' and countryID=$otherCountryID"; $result = mysql($database, $sql); $num = mysql_numrows($result); if ($num) { $otherStateID = mysql_result($result,$i,"stateID"); } else { $sql = "insert into State values ('', '', '', $otherCountryID, '$now', '')"; $result = mysql($database, $sql); $otherStateID = mysql_insert_id(); } } $sql = "update Company set company='$company', address='$address', cityID=0, otherCity='$otherCity', zip='$zip', otherStateID=$otherStateID, phone='$phone', fax='$fax', email='$email', url='$url', password='$login_password', contactFirstName='$contactFirstName', contactLastName='$contactLastName', contactTitle='$contactTitle', processed=0 where companyID=$companyID"; $result = mysql($database, $sql); $seminarID = mysql_insert_id(); Header("Location: ./index.phtml?sid=$sid"); exit; } } # if ($submit) $sql = "select stateID, state, country, State.countryID from State, Country where (State.countryID = Country.countryID) order by state, country"; $result = mysql($database, $sql); $num = mysql_numrows($result); $i=0; while ($i<$num) { if ($otherStateID == mysql_result($result,$i,"stateID")) { if (mysql_result($result,$i,"state")) { $states = "