"; $fEmail=$_POST['fEmail']; $tSubject=$_POST['tSubject']; $tMessage=$_POST['tMessage']; if($fEmail=="" || $tSubject=="" || $tMessage=="" ){ $errors=1; $error.="
  • You did not enter one or more of the required fields. Please go back and try again."; } if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$fEmail)){ $error.="
  • Invalid email address entered"; $errors=1; } if($errors==1) echo $error; else{ $where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$_SERVER[SERVER_NAME].strrev(strstr(strrev($_SERVER[PHP_SELF]),"/")); $message="fEmail: ".$fEmail." tSubject: ".$tSubject." tMessage: ".$tMessage." "; $message = stripslashes($message); mail("sgreathouse@jjay.cuny.edu","Form Submitted at your website",$message,"From: Form Submitted"); header("Refresh: 0;url=http://web.jjay.cuny.edu/~sgreathouse"); ?> Psychology Mail Form All fields marked with a * are required:
    fEmail*
    tSubject*
    tMessage*




    =