Your information has been submitted. We may be in contact with you in the near future.

"); exit(); } }// Endif if ($ok) { // Connect to database server. Connect_to_db($databaseName, $link, $hostName, $userName, $password); // Check to see if email is already in main table. $SearchMainStatement = "SELECT * FROM $op2tableName WHERE email='$email'"; if (Get_results($SearchMainStatement, $link)) { $ok = 0; $errormsg = "

This Email Address was found in our main database.
Please check your typing and try again.

"; } } // Endif // Search for email address in temporary table. $SearchTmpStatement = "SELECT * FROM $op1tableName WHERE email='$email'"; if ($ok && Get_results($SearchTmpStatement, $link)) { $ok = 0; $errormsg = "

This Email Address was found in our pending database.
We are waiting for your authorization to finalize your membership.
Please check your email for a confirmation code.

"; } // Endif if ($ok) { // Calculate Newsletter code according to checkboxes. $newscode = Assign_Newsletter_Code(); } // Endif $ok // Insert record into temp table. if ($ok) { $regdate = date("Y-m-d"); // Calculate Newsletter code according to checkboxes. $newsletter = Assign_Newsletter_Code(); $InsertStatement = "INSERT into $op1tableName SET " . Column_values(); if (!(Rows_affected($InsertStatement, $link))) { $ok = 0; $techmessage = mysql_error($link); $errormsg = "

Error: Unable to add your Email Address to our Database.
$techmessage.
$InsertStatement
Please try again.

"; } else { // Successfully added record to temporay database. // Print form so user can enter their email address and confirmation number. Display_confirmation_form($email); // Send email confirmation to subscriber. Send_Confirmation($name, $email, mysql_insert_id($link), $newscode); exit(); } // End else. }// Endif } // End if $ok if (!$ok) { $header = "Request Info and Newsletter Registration"; $maintext = "

By joining our newsletter groups, you will receive On-line Newsletters and notification of Special Listings.

"; //$maintext .= "

All email addreses within the 'temp' category prior to 11/24/02 have been removed. If you signed up for this category, you must sign up again.

"; $form = ""; $form = "

"; $form .= Display_textboxes(); if (!$msgval){ $form .= "

Please select the newsletters you wish to receive.

"; } if ($msgval){ $form .= "

Please make sure to select all the newsletters you wish to receive - including that currently subscribed to, if desired.

"; } $form .= Display_checkboxes($desc); // IF Only Information options are set, then display them. if (!empty($onlyinfo)) { $form .= "

To have information mailed to you, check the appropriate boxes listed below.
Make sure that you have entered the proper shipping info above.

"; $form .= Display_checkboxes($onlyinfo); } // IF Comment options are set, then display them. if (!empty($commentsection)) { $form .= "

If you would like to send us your comments, please enter them in the box listed below.

"; $form .= Display_commentboxes(); } $form .= "

"; $footer = "

Are you trying to join a newsgroup?
Already have a confirmation number? Then Click Here!
\n"; $footer .= "To Remove Your Email Address From Our Listings Click Here
\n"; $footer .= "For information about CIRB or to return to our site: Click Here

"; Display_msg($header, $maintext . $errormsg . $form . $footer); exit(); } // End if !ok. // Free the memory in $result. mysql_free_result($result); ?>