Skip to main content
Inspiring
June 25, 2007
Question

passing dynamic form variables vi checkbox

  • June 25, 2007
  • 2 replies
  • 364 views
Hi all

I'm trying to do what should be fairly simple, but I can't figure it out!

On page 1 I have a list of clubs and want to select some from a list via a
checkbox. The selected clubs will then be displayed on page 2, where I can
send an email to them.

Page one has the following form:
--------------
<form action="emailclubform.asp" method="post" enctype="multipart/form-data"
name="form1" id="form1">
<%
While ((Repeat1__numRows <> 0) AND (NOT rsClubs.EOF))
%>

<input type="checkbox" name="ClubID" value="1"
id="<%=(rsClubs.Fields.Item("ClubID").Value)%>"/>
<label for="checkbox">
<%=(rsClubs.Fields.Item("ClubName").Value)%></label>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsClubs.MoveNext()
Wend
%>
<br />
<label for="Submit"></label>
<input type="submit" name="Submit" value="Submit" id="Submit" />

</form>
---------------
This displays all the clubs and the checkboxes.

Page 2 has the following recordset (which is where I think I'm going wrong)
SELECT ClubID, ClubName, ClubEmail
FROM rotuki.Clubs
WHERE ClubID = request.Form ("ClubID")

The values from page 1 (the ClubID's) aren't passed to Page 2. I have tried
putting the ClubID as the value in the form, but that also fails.

Any help much appreciated - and if there's a better way of doing it, please
let me know.

Thanks
Chris


This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

Inspiring
June 26, 2007
Hi Mike

Thnaks for the reply - but it doesn't make any difference! I have tried
changing 'post' to 'get' and request.form to request.querystring on the
results page, and numerous other things, but everything fails!

I think I could do with a step-by-strp tutorial on how to set this up - but
I've trawled te Internet for hours and haven't found anything.

Cheers

Chris


"MikeL7" <webforumsuser@macromedia.com> wrote in message
news:f5p9s5$l7j$1@forums.macromedia.com...
> try changing this [ value="1" to this:
> value="<%=(rsClubs.Fields.Item("ClubID").Value)%>"/>]
> and i dont think you need the [enctype="multipart/form-data" ] part if you
> are
> just inserting radio buttons
>
>
>


Inspiring
June 25, 2007
try changing this [ value="1" to this: value="<%=(rsClubs.Fields.Item("ClubID").Value)%>"/>]
and i dont think you need the [enctype="multipart/form-data" ] part if you are just inserting radio buttons