\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 ($yourpassword && strlen("$yourpassword")<4) { $len = strlen("$yourpassword"); if ($len < 4) { $errors = $errors + "Password must be at least 4 characters.

\n"; } } $sql = "select * from Company where company='$company' and phone='$phone'"; $result = mysql($database, $sql); $num = mysql_numrows($result); if ($num) { $errors = $errors + "There is already a company with the name of $company and phone number of $phone.
\nIf you have forgotten your current password and ID, please email customer support with your name, address and email at: Support@seminarfinder.com

\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 ($countryID) { $sql = "select stateID from State where state='' and countryID=$countryID"; $result = mysql($database, $sql); $num = mysql_numrows($result); if ($num) { $stateID = mysql_result($result,$i,"stateID"); } else { $sql = "insert into State values ('', '', '', $countryID, '$now', '')"; $result = mysql($database, $sql); $stateID = mysql_insert_id(); } } $sql = "insert into Company values ('', '$company', '$address', '$otherCity', '', '$zip', '', '$phone', '$fax', '$email', '$url', '$yourpassword', '$contactFirstName', '$contactLastName', '$contactTitle', 25, 5, '$now', '', 0, 0, 0, $stateID)"; /* echo "$sql
\n"; */ $result = mysql($database, $sql); $template = File("freethanks.html"); $i=0; while ($i" + mysql_result($result,$i,"state") + " - " + mysql_result($result,$i,"country") + "\n"; $i++; } $template = File("freetemp.html"); $i=0; while ($i" + mysql_result($result,$j,"country") + "\n"; $j++; } } $template[$i] = ereg_replace("\[contactFirstName\]", "$contactFirstName", $template[$i]); $template[$i] = ereg_replace("\[contactLastName\]", "$contactLastName", $template[$i]); $template[$i] = ereg_replace("\[company\]", "$company", $template[$i]); $template[$i] = ereg_replace("\[contactTitle\]", "$contactTitle", $template[$i]); $template[$i] = ereg_replace("\[address\]", "$address", $template[$i]); $template[$i] = ereg_replace("\[otherCity\]", "$otherCity", $template[$i]); $template[$i] = ereg_replace("\[states\]", "$states", $template[$i]); $template[$i] = ereg_replace("\[countries\]", "$countries", $template[$i]); $template[$i] = ereg_replace("\[zip\]", "$zip", $template[$i]); $template[$i] = ereg_replace("\[phone\]", "$phone", $template[$i]); $template[$i] = ereg_replace("\[fax\]", "$fax", $template[$i]); $template[$i] = ereg_replace("\[url\]", "$url", $template[$i]); $template[$i] = ereg_replace("\[email\]", "$email", $template[$i]); $template[$i] = ereg_replace("\[yourpassword\]", "$yourpassword", $template[$i]); $template[$i] = ereg_replace("\[errors\]", "$errors", $template[$i]); $template[$i] = ereg_replace("\[scriptname\]", "$PHP_SELF", $template[$i]); echo $template[$i] + "\n"; $i++; } >