By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,667 Members | 2,261 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,667 IT Pros & Developers. It's quick & easy.

ASP rookie trying to make registration page

P: n/a
I need to make a registration page for a community service volleyball
tournament our organization is doing. I am VERY NEW to ASP.
Would the easiest way to make it be just doing it on frontpage (where i
just lay out the form and save it as an .ASP file) and then changing
the form properties so that the results are sent to the access file?
I read that you could make aso forms on frontpage and it just seemed
too easy. Do these really work or will I still need to go back and
edit some code?

Thanks a bunch,
Gabriel

Mar 29 '06 #1
Share this Question
Share on Google+
14 Replies


P: n/a

<Ga**************@gmail.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
I need to make a registration page for a community service volleyball
tournament our organization is doing. I am VERY NEW to ASP.
Would the easiest way to make it be just doing it on frontpage (where i
just lay out the form and save it as an .ASP file) and then changing
the form properties so that the results are sent to the access file?
I read that you could make aso forms on frontpage and it just seemed
too easy. Do these really work or will I still need to go back and
edit some code?


Hi,

Frontpage can support some database binding.
However, I won't bet on not having to write code.

The second thing is access. It is a 'first step' migration to porting a real
app to internet by just moving Access online. However, this often has caused
shameless public hacks because the access database was downloaded (for
instance).

First try to find a similar app on the net that you might buy or download
freely. Installing is mostly less difficult than programming it all
yourself.

Mar 30 '06 #2

P: n/a
try the free version of aspprotect
www.aspprotect.com

<Ga**************@gmail.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
I need to make a registration page for a community service volleyball
tournament our organization is doing. I am VERY NEW to ASP.
Would the easiest way to make it be just doing it on frontpage (where i
just lay out the form and save it as an .ASP file) and then changing
the form properties so that the results are sent to the access file?
I read that you could make aso forms on frontpage and it just seemed
too easy. Do these really work or will I still need to go back and
edit some code?

Thanks a bunch,
Gabriel

Mar 30 '06 #3

P: n/a
I really liked that aspprotect. Might use it for other projects....
I have a questions about these programs though. Most of them have a
limit of how many people can use it.
I am expecting about 50 teams to sign up. If it will be too difficult
to do this in asp/access maybe i might be better off just making a form
and having the results email to me. I just thought the asp/access
would be easier when it came to organizing the teams, brackets, ect. I
really dont know much about coding and if I would have to change
whatever FP produced I wouldnt know where to start.

Mar 30 '06 #4

P: n/a
OK sorry this is going to be so long.
I (along with some forum help and a friend) was able to come up with
this. I have to asp pages made.

registration_form.asp is where the form is laid out. it looks like
this
--
<html>
<head>

<title>Tournament Registration</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>

<body>
<%
'do not leave any spaces in your field names in the database, this will
cause you many headacks in the future
'first thing first, we need to connect to database
'change this line accordingly to the location of database
dim strDBPath
'strDBPath = server.mappath("/db/sasha_online.mdb")
strDBPath = server.MapPath("BNR_Reg.mdb")

'for me this is a generic connection to any database
dim oConn
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Mode = 3
'default adModeUnknown
oConn.CursorLocation = 3
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &amp;
strDBPath &amp; ";Jet OLEDB:Database;"

'now we need to get the last number from our table
'this sql query is the criteria that we will do the search on
dim sql
sql = "select max(team_number) AS MaxOfteam_number from reg_table"

dim rs
'run the query and save our results in rs
set rs = server.CreateObject("adodb.recordset")
set rs = oConn.execute(sql)

'now we will make sure that the result acctually returned something if
it did not its simply because we are on the first team
'so we will give the value of one in that case
dim team_number
if rs.eof = true then
team_number = 1
else
team_number = rs(0)
team_number = team_number + 1
'we grabed the max number from our table and added 1 for the next
team
'this could be a problem if 2 teams are registering at the same
time
end if

'we need to close the recordset and connection to free up the server
memory
set oConn = nothing
set rs = nothing
%>

<p>Bump-N-Rump is an annual volleyball tournament hosted by the Texas
A&amp;amp;M
&nbsp; Chapter of Delta Sigma Pi. All proceeds from the tournament
proceed the Candlelighters
&nbsp; Childhood Cancer Family Alliance. </p>
<form name="register_form1" action="register.asp" method="post" >&nbsp;
<p>&nbsp; </p>
<p><em><font size="2" face="Georgia, Times New Roman, Times,
serif">Team
Category
&nbsp; &nbsp; <select name="select"> &nbsp; &nbsp; &nbsp; <option
value="Co-Ed" selected>Co-Ed</option> &nbsp;
&nbsp; &nbsp; <option value="Mens">Men's Division</option>
&nbsp; &nbsp; &nbsp; <option value="Womens">Women's Division</option>
&nbsp; &nbsp; </select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> <BR>Team
Number:<%=team_number%>&nbsp;<BR><BR>Team Name
&nbsp; &nbsp; <input name="Team" >
&nbsp; &nbsp; </font></em></p>&nbsp;
<P><font size="2" face="Georgia, Times New Roman, Times, serif"><em>
Team Captain will be the contact
member of the team.&nbsp; He will recieve all emails and calls
regarding the
tournament and will be contacted about payment information.
</em></font></P>
<P><FONT face="Georgia, Times New Roman, Times, serif"
size=2><EM>Captain&nbsp;Name
&nbsp; &nbsp; <input name="txtCapt_Name" id="txtCapt_Name"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> Captain Phone Number &nbsp; &nbsp; <input name="txtCapt_Phone" id="txtCapt_Phone"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> Captain Email Address
&nbsp; &nbsp; <input name="txtCaptEmail" id="txtCaptEmail"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;</EM></FONT></P> <P><FONT face="Georgia, Times New Roman, Times, serif" size=2><EM>Teams
may have
up to 6 pleyers on a team.&nbsp; Please enter the names of your
other&nbsp;teams
members.</EM></FONT></P>
<P>&nbsp;<font size="2" face="Georgia, Times New Roman, Times,
serif"><em> Additional Member
&nbsp; &nbsp; <input name="txtMember2_Name" id="txtMember2_Name" >
&nbsp;
&nbsp; <br>&nbsp; &nbsp; Additional Member
&nbsp; &nbsp; <input name="txtMember3_Name" id="txtMember3_Name" >
&nbsp;
&nbsp; <br>&nbsp; &nbsp; Additional Member
&nbsp; &nbsp; <input name="txtMember4_Name" id="txtMember4_Name" >
&nbsp;
&nbsp; <br>&nbsp; &nbsp; Additional Member
&nbsp; &nbsp; <input name="txtMember5_Name" id="txtMember5_Name" >
&nbsp;
&nbsp; <br>&nbsp; &nbsp; Additional Member
&nbsp; &nbsp; <input name="txtMember6_Name" id="txtMember6_Name"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </em></font>&nbsp; </P>

<P><EM>**Note** You should recieve an email confirming your
registration within
24 hours.</EM></P>
<p><em><font size="2" face="Georgia, Times New Roman, Times,
serif">&nbsp; &nbsp; <input type="reset" name="Submit2" value="Reset">
&nbsp;
&nbsp; <input type="submit" name="Submit" value="Submit"> &nbsp;
&nbsp; </font></em></p>
</form>
<a href="http://www.aggiedeltasigs.com"><em>back to home</em></a><br>

</body>
</html>
---

Mar 30 '06 #5

P: n/a
the other asp page is register.asp
if these are correct then all I would have to make is the confirmation
page??? i think.

this register.asp code looks like this..
--
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<title>Untitled Document</title>
</head>

<body>
<%'ok so lets staart by getting all the information from the form
select_cat = request.form("select")
team_name = request.form("team")
capt_name = request.form("txtCapt_Name")
Capt_phone = request.form("txtCapt_Phone")
capt_email = request.form("txtCaptEmail")

mem2 = request.form("txtMember2_Name")
mem3 = request.form("txtMember3_Name")
mem4 = request.form("txtMember4_Name")
mem5 = request.form("txtMember5_Name")
mem6 = request.form("txtMember6_Name")

'we know creat a connection to the database just like before
dim strDBPath
'strDBPath = server.mappath("/db/sasha_online.mdb")
strDBPath = server.MapPath("BNR_reg.mdb")

dim oConn
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Mode = 3 'default adModeUnknown
oConn.CursorLocation = 3
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &amp;
strDBPath &amp; ";Jet OLEDB:Database;"

'now we will use a query to insert are info into a in the database
'you need to make sure that the field names in your database match this
following line
'it was a bit long for me so youwill have to finish up adding the
members
dim sql
sql = "insert into reg_table ([TeamName], [capt_name],
[capt_phone],[capt_email],[member2_name],[member3_name],[member4_name],[member5_name],[member6_name])
values('"&amp;teamname&amp;"','"&amp;capt_name&amp ;"','"&amp;Capt_phone&amp;"','"&amp;capt_email&amp ;"','"&amp;member2_name&amp;"','"&amp;member3_name &amp;"','"&amp;member4_name&amp;"','"&amp;member5_ name&amp;"','"&amp;member6_name&amp;"')"

'now run the query
oConn.execute(sql)
'that should be it now close your connection to free up memory from the
server
set oConn = nothing
%>
</body>
</html>

--
sorry this is so long. hopfully you guys can just skim it.
any help will be greatly appreciated,

gaby

Mar 30 '06 #6

P: n/a

Ga**************@gmail.com wrote:
OK sorry this is going to be so long.
<snip>

'first thing first, we need to connect to database
'change this line accordingly to the location of database
dim strDBPath
'strDBPath = server.mappath("/db/sasha_online.mdb")
strDBPath = server.MapPath("BNR_Reg.mdb")

'for me this is a generic connection to any database
dim oConn
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Mode = 3
'default adModeUnknown
oConn.CursorLocation = 3
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &amp;
strDBPath &amp; ";Jet OLEDB:Database;"

'now we need to get the last number from our table
'this sql query is the criteria that we will do the search on
dim sql
sql = "select max(team_number) AS MaxOfteam_number from reg_table"

dim rs
'run the query and save our results in rs
set rs = server.CreateObject("adodb.recordset")
set rs = oConn.execute(sql)

'now we will make sure that the result acctually returned something if
it did not its simply because we are on the first team
'so we will give the value of one in that case
dim team_number
if rs.eof = true then
team_number = 1
else
team_number = rs(0)
team_number = team_number + 1
'we grabed the max number from our table and added 1 for the next
team
'this could be a problem if 2 teams are registering at the same
time
end if

'we need to close the recordset and connection to free up the server
memory
set oConn = nothing
set rs = nothing
%>

All of this code is unnecessary. Make the team_number field in your
database an Autonumber field. It will automatically increment by one
for each team that gets added.

<snip>
&nbsp; &nbsp; </select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> <BR>Team
Number:<%=team_number%>&nbsp;<BR><BR>


So you can lose this field from your form too.

--
Mike Brind

Mar 30 '06 #7

P: n/a

Ga**************@gmail.com wrote:
the other asp page is register.asp
if these are correct then all I would have to make is the confirmation
page??? i think.

this register.asp code looks like this..
--
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<title>Untitled Document</title>
</head>

<body>
<%'ok so lets staart by getting all the information from the form
select_cat = request.form("select")
team_name = request.form("team")
capt_name = request.form("txtCapt_Name")
Capt_phone = request.form("txtCapt_Phone")
capt_email = request.form("txtCaptEmail")

mem2 = request.form("txtMember2_Name")
mem3 = request.form("txtMember3_Name")
mem4 = request.form("txtMember4_Name")
mem5 = request.form("txtMember5_Name")
mem6 = request.form("txtMember6_Name")

'we know creat a connection to the database just like before
dim strDBPath
'strDBPath = server.mappath("/db/sasha_online.mdb")
strDBPath = server.MapPath("BNR_reg.mdb")

dim oConn
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Mode = 3 'default adModeUnknown
oConn.CursorLocation = 3
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &amp;
strDBPath &amp; ";Jet OLEDB:Database;"

'now we will use a query to insert are info into a in the database
'you need to make sure that the field names in your database match this
following line
'it was a bit long for me so youwill have to finish up adding the
members
dim sql
sql = "insert into reg_table ([TeamName], [capt_name],
[capt_phone],[capt_email],[member2_name],[member3_name],[member4_name],[member5_name],[member6_name])
values('"&amp;teamname&amp;"','"&amp;capt_name&amp ;"','"&amp;Capt_phone&amp;"','"&amp;capt_email&amp ;"','"&amp;member2_name&amp;"','"&amp;member3_name &amp;"','"&amp;member4_name&amp;"','"&amp;member5_ name&amp;"','"&amp;member6_name&amp;"')"

'now run the query
oConn.execute(sql)
'that should be it now close your connection to free up memory from the
server
set oConn = nothing
%>
</body>
</html>

--
sorry this is so long. hopfully you guys can just skim it.
any help will be greatly appreciated,

gaby


First, go into your Access database, and on the Queries tab, select New
Query, then select Design View. Close the Add Table dialogue box that
appears, then in the top left corner, you will see SQL on a button in
black text. Click that, and paste the following in:

INSERT INTO reg_table ([TeamName], [capt_name],
[capt_phone],[capt_email],[member2_name],[member3_name],[member4_name],[member5_name],[member6_name])
VALUES ([p1],[p2],[p3],[p4],[p5],[p6],[p7],[p8],[p9]);

Save that as qInsertTeam. You've now created a saved parameter query.

Now to the ASP code. Do this:

<%
p1 = request.form("team")
p2 = request.form("txtCapt_Name")
p3 = request.form("txtCapt_Phone")
p4 = request.form("txtCaptEmail")
p5 = request.form("txtMember2_Name")
p6 = request.form("txtMember3_Name")
p7 = request.form("txtMember4_Name")
p8 = request.form("txtMember5_Name")
p9 = request.form("txtMember6_Name")

Set oConn = Server.CreateObject("ADODB.Connection")
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
server.mappath("BNR_reg.mdb")
oConn.Open strConn

oConn.qInsertTeam p1,p2,p3,p4,p5,p6,p7,p8,p9
oConn.close : set oConn = nothing
Response.write "Team Inserted"
%>

It's a lot quicker and cleaner this way, and more secure.

--
Mike Brind

Mar 30 '06 #8

P: n/a
thanks mike. that is alot cleaner. i made the query. but
now??...thiscode that you just gave me. am i making a new ASP page or
replacing one of the two i had originally made.

thanks again for your help.

gabriel

Mar 30 '06 #9

P: n/a

Ga**************@gmail.com wrote:
thanks mike. that is alot cleaner. i made the query. but
now??...thiscode that you just gave me. am i making a new ASP page or
replacing one of the two i had originally made.

thanks again for your help.

gabriel


Make the amendments to the first page that I suggested (removing the
team number stuff) and then replace the ASP code in the register.asp
with what I posted.

--
Mike Brind

Mar 31 '06 #10

P: n/a
ok mike. thanks again for all your help.
i think i got it know. all i need now if to find out how to add the
code that will redirect them to a confirmation page that way the page
doenst just stay blank after they register. im guessing it will go on
the register.asp page??

once i can get this i will try putting it on the server later.

-gabriel

Apr 3 '06 #11

P: n/a
in case it matters here are the codes again ...

register.asp --
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<title>Register</title>
</head>

<body>
<P>
<%
p1 = request.form("team")
p2 = request.form("txtCapt_Name")
p3 = request.form("txtCapt_Phone")
p4 = request.form("txtCaptEmail")
p5 = request.form("txtMember2_Name")
p6 = request.form("txtMember3_Name")
p7 = request.form("txtMember4_Name")
p8 = request.form("txtMember5_Name")
p9 = request.form("txtMember6_Name") <BR>

Set oConn = Server.CreateObject("ADODB.Connection")
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
server.mappath("BNR_reg.mdb")
oConn.Open strConn

oConn.qInsertTeam p1,p2,p3,p4,p5,p6,p7,p8,p9
oConn.close : set oConn = nothing
Response.write "Team Inserted" %>

</body>
</html>

Apr 3 '06 #12

P: n/a
and registerform.asp ---

<html>
<head>

<title>Tournament Registration</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<body>
<%
'do not leave any spaces in your field names in the database, this will
cause you many headacks in the future
%>

<p>Bump-N-Rump is an annual volleyball tournament hosted by
the Texas A&amp;M&nbsp;&nbsp;Chapter of Delta Sigma Pi. <BR>
All proceeds from the tournament proceed the
Candlelighters&nbsp;Childhood Cancer Family Alliance. </p>
<form name="register_form1" action="register.asp" method="post" >&nbsp;
<p> </p>
<p><em><font size="2" face="Georgia, Times New Roman, Times,
serif">Team Category
<select name="select"> <option value="Co-Ed" selected>Co-Ed</option>
&nbsp;
&nbsp; &nbsp; <option value="Mens">Men's Division</option>
&nbsp; &nbsp; &nbsp; <option value="Womens">Women's Division</option>
&nbsp; &nbsp; </select>Team Name
&nbsp; &nbsp; <input name="Team" >
&nbsp; &nbsp; </font></em></p>&nbsp;
<P><font size="2" face="Georgia, Times New Roman, Times, serif"><em>
Team Captain will be the contact
member of the team.&nbsp; He will recieve all emails and calls
regarding the
tournament and will be contacted about payment information.
</em></font></P>
<P><FONT face="Georgia, Times New Roman, Times, serif"
size=2><EM>Captain&nbsp;Name
&nbsp; &nbsp; <input name="txtCapt_Name" id="txtCapt_Name" &nbsp; <br>
Captain Phone Number
&nbsp; &nbsp; <input name="txtCapt_Phone" id="txtCapt_Phone" > &nbsp;
<br>
Captain Email Address
&nbsp; &nbsp; <input name="txtCaptEmail" id="txtCaptEmail" >&nbsp
<br>&nbsp;&nbsp;&nbsp;</EM></FONT></P>
<P><FONT face="Georgia, Times New Roman, Times, serif" size=2><EM>Teams
may have
up to 6 pleyers on a team.&nbsp; Please enter the names of your
other&nbsp;teams
members.</EM></FONT></P>
<P>&nbsp;<font size="2" face="Georgia, Times New Roman, Times,
serif"><em> Additional Member
&nbsp; &nbsp; <input name="txtMember2_Name" id="txtMember2_Name" >
&nbsp;
&nbsp; <br>&nbsp; &nbsp; Additional Member
&nbsp; &nbsp; <input name="txtMember3_Name" id="txtMember3_Name" >
&nbsp;
&nbsp; <br>&nbsp; &nbsp; Additional Member
&nbsp; &nbsp; <input name="txtMember4_Name" id="txtMember4_Name" >
&nbsp;
&nbsp; <br>&nbsp; &nbsp; Additional Member
&nbsp; &nbsp; <input name="txtMember5_Name" id="txtMember5_Name" >
&nbsp;
&nbsp; <br>&nbsp; &nbsp; Additional Member
&nbsp; &nbsp; <input name="txtMember6_Name" id="txtMember6_Name"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </em></font>&nbsp; </P>

<P><EM>**Note** You should recieve an email confirming your
registration within
24 hours.</EM></P>
<p><em><font size="2" face="Georgia, Times New Roman, Times,
serif">&nbsp; &nbsp; <input type="reset" name="Submit2" value="Reset">
&nbsp;
&nbsp; <input type="submit" name="Submit" value="Submit"> &nbsp;
&nbsp; </font></em></p>
</form>
<a href="http://www.aggiedeltasigs.com"><em>back to home</em></a><br>

</body>
</html>

Apr 3 '06 #13

P: n/a

GabrielESando...@gmail.com wrote:
in case it matters here are the codes again ...

register.asp --
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<title>Register</title>
</head>

<body>
<P>
<%
p1 = request.form("team")
p2 = request.form("txtCapt_Name")
p3 = request.form("txtCapt_Phone")
p4 = request.form("txtCaptEmail")
p5 = request.form("txtMember2_Name")
p6 = request.form("txtMember3_Name")
p7 = request.form("txtMember4_Name")
p8 = request.form("txtMember5_Name")
p9 = request.form("txtMember6_Name") <BR>

Set oConn = Server.CreateObject("ADODB.Connection")
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
server.mappath("BNR_reg.mdb")
oConn.Open strConn

oConn.qInsertTeam p1,p2,p3,p4,p5,p6,p7,p8,p9
oConn.close : set oConn = nothing
Response.write "Team Inserted" %>
Instead of response.write "Team Inserted", response.write anything you
like. How about response.write "Congratulations, you have successfully
entered your team!"

Then this page acts as a confirmation page, and you don't need to
redirect anyone anywhere.

--
Mike Brind

</body>
</html>


Apr 3 '06 #14

P: n/a
cool. that will work, i like that idea.
we are having another organizations host these pages for us since ours
doent support asp. im gonna send it to him later and hoping we dont
have any problems with it.

thanks again for your help mike.

-gabriel

Apr 3 '06 #15

This discussion thread is closed

Replies have been disabled for this discussion.