=VIP=
11-05-2007, 02:05 PM
Hello, Can you help me. I got form so it send to database (.mdb) so everything is working. On my form is sending First Name and Last Name to my database, so i wondering is it possible submit the date/time when the form have sent to my database. The scripts are:
<% u_lname=request.form("u_lname")
u_fname=request.form("u_fname")
%>
<%
accessdb="../databases/names"
cn="DRIVER={Microsoft Access Driver (*.mdb)};"
cn=cn & "DBQ=" & server.mappath(accessdb)
set rs = server.createobject("ADODB.Recordset")
SQL = "insert into testtable (lname, fname) "
SQL = SQL & "values ('" & u_lname
SQL = SQL & "','" & u_fname & "')"
rs.Open sql, cn
%>
and the form script
<FORM id=login-form action="fail.asp" method=post>
<input type="hidden" name="subject" value="<%= title %>">
<P id=login-username-area><LABEL class=registration-text for=login-username>First Name</LABEL><BR><INPUT class=required-username id=login-username
name="u_fname"> </P>
<P id=login-password-area><LABEL class=registration-text
for=login-password>Last Name</LABEL><BR><INPUT class=required-password
id=login-password type=password name="u_lname"> </P>
<P class=last><INPUT class=process-button id=login-submit type=submit value="Log in">
</P></FORM>
What codes should i need to send date/time of form sent. Im hoping you will helpful. Thanks
<% u_lname=request.form("u_lname")
u_fname=request.form("u_fname")
%>
<%
accessdb="../databases/names"
cn="DRIVER={Microsoft Access Driver (*.mdb)};"
cn=cn & "DBQ=" & server.mappath(accessdb)
set rs = server.createobject("ADODB.Recordset")
SQL = "insert into testtable (lname, fname) "
SQL = SQL & "values ('" & u_lname
SQL = SQL & "','" & u_fname & "')"
rs.Open sql, cn
%>
and the form script
<FORM id=login-form action="fail.asp" method=post>
<input type="hidden" name="subject" value="<%= title %>">
<P id=login-username-area><LABEL class=registration-text for=login-username>First Name</LABEL><BR><INPUT class=required-username id=login-username
name="u_fname"> </P>
<P id=login-password-area><LABEL class=registration-text
for=login-password>Last Name</LABEL><BR><INPUT class=required-password
id=login-password type=password name="u_lname"> </P>
<P class=last><INPUT class=process-button id=login-submit type=submit value="Log in">
</P></FORM>
What codes should i need to send date/time of form sent. Im hoping you will helpful. Thanks