0) { if (strlen($ClientID)>0) { $apptdate=date("Y-m-d H:i:s"); mssql_query( "insert into client_appts (login,apptdate,url,industry,apptname,apptemail) values ('$ClientID','$apptdate','{$HTTP_HOST}','$Industry','$txtName','$txtEmail')"); } mssql_close( $link ); $txtComments=ereg_replace("\"","'",$txtComments); $body="Name: $txtName\nEmail: $txtEmail\nPhone: ($txtPh1) $txtPh2-$txtPh3\n\nLocation: $OfficeLoc\n\nDesired Date:$zMONTH $zDAY $zYEAR\n\nDesired Day/Time: $selectDay @ $selectTime\n\nIs more flexible regarding $selectFlexible\n\nComments:\n$txtComments"; $headers .= "From: $txtName <$txtEmail>\n"; $headers .= "X-Sender: <$txtEmail>\n"; mail($Email, "Appointment Request from Web site", $body,$headers); } ?>