I tried to locate the request.form and it is a bit complicated for me here is what it look like
if Request.ServerVariables("Content_Length") > 0 then
tb = Request.Form("tb")
'Administrator may not make entries.
if Session("FootballPoolUsername") = ADMIN_USERNAME then
call ErrorMessage("User '" & ADMIN_USERNAME & "' may not enter picks.")
errorFlag = true
'If all games locked, no changes allowed.
elseif allLocked then
call ErrorMessage("All games for this week have been locked out, changes not accepted.")
errorFlag = true
'Check tie breaker value.
else
if tb = "" then
call ErrorMessage("You must enter a point total for the tie breaker, changes not accepted.")
errorFlag = true
elseif not IsNumeric(tb) then
call ErrorMessage("Tie breaker point total must be numeric, changes not accepted.")
errorFlag = true
elseif tb < 0 or CDbl(tb) <> Round(CDbl(tb)) then
call ErrorMessage("Invalid tie breaker point value, changes not accepted.")
errorFlag = true
end if
end if
'Check for picks in locked out games
if not allLocked then
anyLocked = false
for i = 0 to UBound(games)
if Request.Form("pick-" & games(i).id) <> "" and games(i).isLocked then
call ErrorMessage(games(i).visitorName & " at " & games(i).homeName _
& " has been locked, this change not accepted.")
errorFlag = true
anyLocked = true
end if
next
if anyLocked then
call ErrorMessage("Please resubmit to update remaining picks.")
end if
end if
if not allLocked then
anyLocked = false
for i = 0 to UBound(games)
if Request.Form("pick1-" & games(i).id) <> "" and games(i).isLocked then
call ErrorMessage(games(i).visitorName & " at " & games(i).homeName _
& " has been locked, this change not accepted.")
errorFlag = true
anyLocked = true
end if
next
if anyLocked then
call ErrorMessage("Please resubmit to update remaining picks.")
end if
end if
'If there were no errors, process the data and redirect the user to the
'results page.
if not errorFlag then
for i = 0 to UBound(games)
pick = Request.Form("pick-" & games(i).id)
if pick = "" then
pick = GetPick(games(i).id)
end if
sql = "delete from Picks" _
& " where Username = '" & Session("FootballPoolUsername") & "'" _
& " and GameID = " & games(i).id
set rs = DbConn.Execute(sql)
sql = "insert into Picks" _
& " (Username, GameID, Pick, Pick1)" _
& " values('" & Session("FootballPoolUsername") & "'," _
& " '" & games(i).id & "', " _
& " '" & pick & "')"
set rs = DbConn.Execute(sql)
next
if tb <> "" then
sql = "delete from TieBreaker" _
& " where Week = " & week _
& " and Username = '" & Session("FootballPoolUsername") & "'"
set rs = DbConn.Execute(sql)
sql = "insert into TieBreaker" _
& " (Week, Username, TBPoints)" _
& " values(" & week & ", '" & Session("FootballPoolUsername") & "'," _
& " " & tb & ")"
set rs = DbConn.Execute(sql)
end if
Response.Redirect("results.asp?week=" & week)
end if
end if
'Build the form. %>
and up to this point I am completly lost