Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checkbox Inserts Record

Status
Not open for further replies.

jmiller79

Programmer
Jul 13, 2004
48
US
I have a Page that generates a report. On the top of the page I have a link that says save page. All it does is takes the url of that page and inserts it into a field on the next page. The next page is obliviously a record insert page. The record insert page has the following fields. UserID, URL, Page Name. This works perfect. It has been working for about 9 months now. But now I want to be able to do now is. Have a list of customers where I can save that page to. Example, I click save page. And on the next page a record insert form is there with all my info. But below that is everyone else’s info with check boxes next to there names. If I check a list box the record will also insert a record with there: UserID, URL, Page Name, when I hit insert at the bottom of the page.
 
Just do a loop of your users... you may have to do some paging here. If you need help with that let me know.

Have the loop inside <form> tags call the check box by each user.. usercheck or something then put the id of that user in there for the value. one submit use this at the end of your sql
Code:
frmUserCheck = Request.Form("usercheck")

If frmUserCheck <> "" then 
' SOME Sql in front to do update.... etc
   WHERE userId in(" & frmUserCheck & ")"
End If

www.sitesd.com
ASP WEB DEVELOPMENT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top