Hi folks,
I have created an application that will allow users to log visitors to our humble organisation. I am using an Access database back end that I currently input the visitor name into (one text field only). However I want to be able to insert not just one name at a time but rather 2 to 5 names (for delegations)in order to speed things up. In other words I want to be able to insert several records of the same field type with one hit of the Submit button.
My code is as follows:
asp page 1
<tr>
<td><b><font size="2">Visitor</font></b></td>
<td><input type="text" name="date_today" size="11"><font size="2"></font></td>
<td> <input type="submit" value="Submit Form" name="Submit"></td>
</tr>
asp confirmation page
<%
dim objConn, strQuery
set objConn = Server.CreateObject("ADODB.Connection"
'objConn.Open("DSN=Visitors"
objConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Microsoft Site Server\Data\Publishing\ininet\Databases\visitors.mdb;Persist Security Info=False"
strQuery = "INSERT INTO daily_Visitors(visitor_name) "
strQuery = strQuery & "VALUES ('"
strQuery = strQuery & Request.Form("visitor"
objConn.Execute(strQuery)
objConn.close
%>
Instead of inserting just the one value into the visitor_name field, I want to insert 5 values into the visitor_name field, meaning 5 new records.
Can anyone help?
Cheers,
Tazzer