0){ $mailexist='TRUE'; $usermail='';} } // make sure REQUIRED values have been filled in // To add more requirements uncomment the fields below: if ($firstname == '' || $lastname == '' || $usermail == '' // || $cityname == '' // || $statename == '' // || $countryname == '' // || $organization == '' // || $orgtype == '' ) { $errors = "true"; } // REMOVE WHITESPACE AND ENTER INTO DATABASE else { $alldone = "TRUE"; $firstname = trim($firstname); $lastname = trim($lastname); $usermail = trim($usermail); $usermail = strtolower($usermail); $cityname = trim($cityname); $organization = trim($organization); $sql = "INSERT INTO mail_list (usrID, first_name, last_name, e_mail, city, state, country, organization, org_type) VALUES ('','$firstname', '$lastname', '$usermail', '$cityname', '$statename', '$countryname', '$organization', '$orgtype')"; $result = mysql_query($sql); } } print "
\n"; } else { print" "; } print "
"; if ($alldone){ //--SEND MAIL $tgl = date("F d, Y - h:i A"); $msgtitle = "Welcome to VIPERdb"; $msgcontent = "Local time : $tgl\n\nYou have successfully been added to the VIPERdb mailing list!\nYou will now be the first to receive any updates on new Viral Coordinates, Analysis Tools, and other Virus-related news!\n If you ever wish to stop receiving mailings from VIPERdb, send an e-mail to viper@scripps.edu with the subject heading 'unsubscribe'.\n\nWelcome to the VIPERdb Community!\n"; mail($usermail,$msgtitle,$msgcontent,"From: viper@scripps.edu\n"); // print page: print "Thank you for taking the time to subscribe to the VIPERdb mailing list.
\n"; print "You will receive an e-mail shortly informing you of your subscription.
\n"; print "You have submitted the following information:


\n"; print "Name: $firstname $lastname
\n"; print "E-mail: $usermail
\n"; print "Location: $cityname, $statename
\n"; print "Country: $countryname
\n"; print "Organization: $organization ($orgtype)
\n"; print "

BACK TO VIPERdb HOME\n"; } else { if ($errors == 'true') { print "

We're sorry, we could not subscribe you to our mailing list due to the following errors:
\n

    "; if ($firstname == ''){print "
  • You did not specify your first name.
    \n";} if ($lastname == ''){print "
  • You did not specify your last name.
    \n";} if ($usermail == '') { if ($mailexist) { print "
  • The e-mail address you specified is already in our database,
    Please use a new address.

    \n"; $mailexists=''; } else { print "
  • You did not specify a valid e-mail address.
    \n"; print "(e.g., hello@myworld.com)
    \n" ; } } // if ($cityname == ''){print "
  • You did not specify a city.
    \n";} // if ($statename == ''){print "
  • You did not specify a state -
    // NOTE: If the state/providence section is not applicable, select \"Not // Applicable\" from the bottom of the list.\n";} // if ($countryname == ''){print "
  • You did not specify a country.
    \n";} // if ($organization == ''){print "
  • You did not specify the organization to which you belong.
    \n";} // if ($orgtype == ''){print "
  • You did not specify an organization type.
    \n";} print "
\n
\nPlease take the time to complete your submission:
\n"; print "


\n"; print "
Sign up to receive news concerning VIPERdb updates

We respect your privacy!
Your name and e-mail address will NOT be shared with any third party. At the bottom of every e-mail you receive from VIPERdb you will have the opportunity to delete yourself from our mailing list and prevent any further mailings.

(*) Denote Required Fields

* First Name:
\n"; if ($firstname == '') { print"\n"; } else { print" $firstname \n"; } print"
* Last Name: "; if ($lastname == '') { print"\n"; } else { print" $lastname \n"; } print"
* E-mail: "; if ($usermail == '') { print"\n"; } else { print" $usermail \n"; } print"
City: "; if ($cityname == '') { print"\n"; } else { print" $cityname \n"; } print"
State/Providence: "; if ($statename == '') { print" "; } else { print" $statename \n"; } print"
Country: "; if ($countryname == '') { print" "; } else { print" $countryname \n"; } print"
Organization: "; if ($organization == '') { print"\n"; } else { print" $organization \n"; } print "
Organization Type: "; if ($orgtype == '') { print " Academic
Commercial
\n"; } else { print" $orgtype \n"; } print "

"; } print"
"; include ("footer.html"); ?>