<%@ Language=VBScript%> <%Response.Buffer=true 'Remove this code 'start Session("ID")="1" session("Branch")="India" 'end %> <% Dim strDBPath if Session("ID") = "" then Response.Redirect("login.asp") end if Dim strBranch strBranch=Session.Contents("Branch") Dim strYear strYear=2008 %> Form Submission
 


Registration Form
 

Welcome, <%=Session.Contents("ID")%>   Add New Branch/Centres Info  Edit/ Delete Centre Info   Log Out
3. Insert Registration Information
Branch Name : <%=strBranch%>
Blk :
Year : <%=strYear%>
Date From :  /  / <%=strYear%>
Date To :  /  / <%=strYear%>
Time From :  :   
Time To :    
<% if Request.QueryString("add")="yes" then Dim strDateFrom, strDateTo, strTimeFrom, strTimeTo, strDateFromDD, strDateFromMM, strDateFromYYYY, strDateToDD, strDateToMM, strDateToYYYY Dim strTimeFromHH, strTimeFromMin, strTimeFromSession,strTimeToHH, strTimeToMin, strTimeToSession strDateFromDD=Request.Form("DateFromDD") strDateFromMM=Request.Form("DateFromMM") strDateToDD=Request.Form("DateToDD") strDateToMM=Request.Form("DateToMM") strTimeFromHH=Request.Form("TimeFromHH") strTimeFromMin=Request.Form("TimeFromMin") strTimeToHH=Request.Form("TimeToHH") strTimeToMin=Request.Form("TimeToMin") strTimeFromSession=Request.Form("Session") strTimeToSession=Request.Form("Session1") strDateFrom=strDateFromDD & "/" & strDateFromMM & "/" &strYear strDateTo=strDateToDD & "/" & strDateToMM & "/" & strYear strTimeFrom=strTimeFromHH & ":" & strTimeFromMin & strTimeFromSession strTimeTo=strTimeToHH & ":" & strTimeToMin & strTimeToSession rs.open "select * from RegistrationDate where id<0",conn,1,3 rs.addnew rs("BRANCH_name")=strBranch rs("BRANCH_name")=request.Form("BLK") rs("BLK")=strBranch rs("Year")=strYear rs("DateFrom")=strDateFrom rs("DateTo")=strDateTo rs("TimeFrom")=strTimeFrom rs("TimeTo")=strTimeTo rs.update ' sql="INSERT INTO RegistrationDate(BRANCH_name,BLK,Year,DateFrom,DateTo,TimeFrom, TimeTo)values('" & strBranch & "','" && "','" & strYear & "','" & strDateFrom & "','" & strDateTo & "','" & strTimeFrom & "','" & strTimeTo & "')" ' Response.Write(sql) ' ' Response.End() ' conn.Execute(sql) conn.close end if %>