<%Option Explicit const CurrentPageDef = "Post Feedback"%> <%dim nwd,nht, PageState PageState = "" nwd=300 nht=300 if GetRequest("nwd")<>"" then if isnumeric(GetRequest("nwd")) then nwd=GetRequest("nwd") end if end if if GetRequest("nht")<>"" then if isnumeric(GetRequest("nht")) then nht=GetRequest("nht") end if end if %> <% dIM ErrStr ErrStr="" if GetRequest("POSTFEEDBACK") <> "" then 'validate if GetRequest("F_NAME") = "" then ErrStr = ErrStr & "Name is Empty" & "
" end if if GetRequest("F_EMAIL") = "" then ErrStr = ErrStr & "Email is Empty" & "
" end if if GetRequest("F_CITY") = "" then ErrStr = ErrStr & "City is Empty" & "
" end if if GetRequest("F_MOBILE") = "" then ErrStr = ErrStr & "Mobile Number is Empty" & "
" end if if GetRequest("F_FEEDBACK") = "" then ErrStr = ErrStr & "Feedback is Empty" & "
" end if if ErrStr="" then Dim InsertSQL, InsertRS InsertSQL = "INSERT INTO FEEDBACK (NAME, EMAIL, CITY, MOBILE, FEEDBACK) " & _ " VALUES (" & _ "'" & left(EscapeQuotesInSQLString(GetRequest("F_NAME")),250) & "'," & _ "'" & left(EscapeQuotesInSQLString(GetRequest("F_EMAIL")),250) & "'," & _ "'" & left(EscapeQuotesInSQLString(GetRequest("F_CITY")),250) & "'," & _ "'" & left(EscapeQuotesInSQLString(GetRequest("F_MOBILE")),250) & "'," & _ "'" & left(EscapeQuotesInSQLString(GetRequest("F_FEEDBACK")),2000) & "'" & _ ")" If ExecQuery(InsertSQL, InsertRS) = "RESULTS" then PageState = "DONE" Dim MessageBody MessageBody = "A new Feedback has been received:" & vbcrlf & vbcrlf & _ "Name: " & GetRequest("F_NAME") & vbcrlf & _ "City: " & GetRequest("F_City") & vbcrlf & _ "Mobile: " & GetRequest("F_Mobile") & vbcrlf & _ "Email: " & GetRequest("F_Email") & vbcrlf & _ "Feedback: " & vbcrlf & vbcrlf & GetRequest("F_Feedback") 'SendMail "finnsys@rfagroup.in", "finnsys@rfagroup.in", "finnsys@rfagroup.in", "rahul.bhagia@gmail.com", "Feedback Received", MessageBody) else PageState = "DBERROR" end if end if end if %> Post your Feedback
<%if PageState = "DONE" then%> <%elseif PageState = "DBERROR" then%> <%else%> <%if ErrStr <> "" then%> <%end if%> <%end if%>
Successfully received your feedback.
We will contact you shortly.
An Error has occured. Please try after sometime.
We are happy to hear from you.
Error posting your form:

<%=ErrStr%>
Your Name: " size=50>
Your EMail: " size=50>
Your Mobile/Landline Number: " size=50>
Your City: " size=50>
Your Feedback:
(max 2000 characters)