<% if request.querystring("action")=2 then function validate(field,value,name) if value="" then validate=field&" is a required field.
" end if end function function buildemail(field,value,name) if value="-1" then value="Yes" end if if value="0" then value="No" end if buildemail=field&vbcrlf&value&vbcrlf&vbcrlf end function message=message&validate("First Name",request.form("first"),"first") message=message&validate("Last Name",request.form("last"),"last") message=message&validate("Home Phone",request.form("home"),"home") message=message&validate("E-mail",request.form("email"),"email") if message="" then sql="insert into referrals (referred,first,last,address,city,zip,home,work,cell,pager,email,problem,description,datum) values(" sql=sql&"'"&replace(request.form("referred"),"'","''")&"','"&replace(request.form("first"),"'","''")&"','"&replace(request.form("last"),"'","''")&"','"&replace(request.form("address"),"'","''")&"','"&replace(request.form("city"),"'","''")&"','"&replace(request.form("zip"),"'","''")&"','"&replace(request.form("home"),"'","''")&"','"&replace(request.form("work"),"'","''")&"','"&replace(request.form("email"),"'","''")&"','"&replace(request.form("cell"),"'","''")&"','"&replace(request.form("pager"),"'","''")&"','"&replace(request.form("problem"),"'","''")&"','"&replace(request.form("description"),"'","''")&"',now()+.125)" Set conn = Server.CreateObject("ADODB.Connection") start=instr(server.mappath("index.asp"),"index.asp")-1 path=left(server.mappath("index.asp"),start)&"database\" conn.Open "DBQ="&path&"civil.mdb;Driver={Microsoft Access Driver (*.mdb)}" Set RS = conn.execute(sql) conn.close set rs = nothing set conn = nothing email=email&buildemail("How did you hear about us?",request.form("referred"),"referred") email=email&buildemail("First Name",request.form("first"),"first") email=email&buildemail("Last Name",request.form("last"),"last") email=email&buildemail("Address",request.form("address"),"address") email=email&buildemail("City, State",request.form("city"),"city") email=email&buildemail("Zip Code",request.form("zip"),"zip") email=email&buildemail("Home Phone",request.form("home"),"home") email=email&buildemail("Work Phone",request.form("work"),"work") email=email&buildemail("Cell Phone",request.form("cell"),"cell") email=email&buildemail("Pager",request.form("pager"),"pager") email=email&buildemail("Legal Problem",request.form("problem"),"problem") email=email&buildemail("Description of Case",request.form("description"),"description") email=email&buildemail("E-mail",request.form("email"),"email") Set objCDOMail = Server.CreateObject("CDONTS.NewMail") objCDOMail.From = "response@civiljusticenetwork.org" objCDOMail.To = "help@civiljusticenetwork.org" objCDOMail.Subject = "Referral Request" objCDOMail.Body = email objCDOMail.Send Set objCDOMail = Nothing end if end if %> Referral Request
<%if not request.querystring("action")=2 or (request.querystring("action")=2 and not message="") then%> <%end if%>

Referral Request Form

<%=message%>

Please complete the following information to the best of your ability and hit the continued button at the bottom of the page. You should receive a response within a couple of days. If you need immediate attention, please contact us by phone at (410) 706-0174.

How Did You Hear About Us?
*First Name
*Last Name
Address
City, State
Zip Code
*Home Phone
Work Phone
Cell Phone
Pager
Legal Problem
Description of Case
*E-mail
* Required Field
<%else%>
Thank You

Thank you for submitting your request. We will be in touch with you shortly.

Please click here to return to the home page.