255 ? "too_long" : false); $errors['email'] = strlen($email)<=0 ? "missing" : (!ereg(EMAIL, $email) ? "bad_format" : false); $errors['phone'] = strlen($phone)<=0 ? "missing" : (!ereg(INT_PHONE, $phone) ? "bad_format" : false); $errors['institution'] = strlen($institution)<=0 ? "missing" : (len_escaped($institution) > 255 ? "too_long" : false); $errors['author'] = strlen($author)<=0 ? "missing" : (len_escaped($author) > 255 ? "too_long" : false); $errors['co_authors'] = len_escaped($author) > 255 ? "too_long" : false; $errors['title'] = strlen($title)<=0 ? "missing" : (len_escaped($title) > 255 ? "too_long" : false); $errors['sec_string'] = strlen($sec_string)<=0 ? "missing" : ($hidden_sec_string != $sec_string ? "no_match" : false); foreach($errors as $error) { if($error !== false) { $_SESSION['form_data'] = $_POST; $_SESSION['form_errors'] = $errors; header("Location: letter_of_intent.php?code=error"); exit; } } // if we're still executing this page, then we'll need to save the letter of intent in the database. // since the information about the security string is no longer important, we'll frist remove that from // the post array. then, since everything is a string, we'll have to escape it all before saving it. unset($_POST['sec_string']); unset($_POST['hidden_sec_string']); $post = array_values($_POST); for($i=0; $i < sizeof($post); $i++) $post[$i] = escape_str($post[$i]); $db->runQuery("INSERT INTO letters_of_intent (full_name, email, phone, institution, author, co_authors, title, " . "timestamp) VALUES (" . join($post, ", ") . ", NOW())"); require_once("$FILE_ROOT/includes/layout/header.php"); ?>

Letter of Intent Saved

Your letter of intent to submit an abstract has been saved in our databases and is available to the organizing committee. Please remember that the final date on which you may submit an abstract is January 15, 2006. Any abstracts submitted following that date will not be considered. You will be contacted either by phone or email if the organizing committee has any questions reqarding your letter of intent. Thank you for your interest in this conference and we look forward to seeing your abstract.