GetLoginID(); if ( ! empty($thefunction)) { if ($thefunction == "validate") { $errors = ValidateRequest($link, $userid); } } ?> ForteBio :: Suggest a Biosensor PageHeadCustom($userid); ?>

Suggest a Biosensor

Thank you for your suggestion!

0) { return $errors; } $recipients = ""; $subject = "Biosensor suggestion from $firstname $lastname"; $body = "Biosensor suggestion submitted from:\n"; $body .= "\tName: $firstname $lastname\n"; $body .= "\tEmail: $email\n\n"; $body .= "\tCompany: $company\n\n"; $body .= "$suggestion\n\n"; $query = "SELECT id, email, type FROM fb_recipients WHERE type='biosensor';"; $result = mysql_query($query, $link); $rows = mysql_num_rows($result); for ($i = 0; $i < $rows; $i++) { if ($recipients != "") { $recipients .= ","; } $recipients .= mysql_result($result, $i, "email"); } // Log the info in the database: LogFormData($link, "biosensor", $firstname, $lastname, $email, $company, $suggestion); $errors['thanks'] = "thanks"; // In case there is no recipient specified. // TEST ONLY: //$errors['test'] = $recipients; //return $errors; if ($recipients != "") { $headers['From'] = $FROM_EMAIL; $headers['Subject'] = $subject; $mail_object =& Mail::factory('smtp'); //$email .= ', fortebio@fortebio-news.com'; $send = $mail_object->send($recipients, $headers, $body); if (PEAR::isError($send)) { $errors['thanks'] = $send->getMessage(); } else { $errors['thanks'] = "thanks"; } } return $errors; } mysql_close($link); ?>