...

View Full Version : how i can Insert into data base with check box



bmwmpower
01-19-2003, 03:56 PM
If i want add into database with check box
For example

I have massage forum and i want the member send massage to multiple user
These codes for send to one user. I want change this code to send to multiple user ((form check box))
===========================================

Dim objConn , objRS , strQ , strConn, strOutput
Set objConn = Server.CreateObject("ADODB.Connection")

objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("users.mdb") & ";"
Set objRS = Server.CreateObject("ADODB.Recordset")


strQ1 = "SELECT * FROM internalmail "




objRS.Open strQ1 , objConn , 1, 2
If Request.form("submit") = "send" Then

objRS.AddNew
objRS("sender") = Request.QueryString("username")
objRS("reciever") = Request.form("to")
objRS("subject") = Request.form("subject")
objRS("message") = Request.form("message")
objRS("date") = Date()
objRS.Update

End If

'Response.Write Request.QueryString("username")

Morgoth
01-19-2003, 07:38 PM
So let me get this straight.

When the user sumbits a form, and if the checkbox is checked you want it to add it into a database? And if it's not checked you want it to send the e-mail?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum