Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%
- Dim player1, player2, st_hand1, p1score
- Dim sConnString, connection, sSQL
- '------------db Connect-------'
- Set conn = Server.CreateObject("ADODB.Connection")
- conn.open "PROVIDER=SQLOLEDB;DATA SOURCE=db396776384.db.1and1.com;UID=dbo396776384;PWD=flashcs3;DATABASE=db396776384"
- player1 = Request.Form("name1")
- player2 = Request.Form("name2")
- points1 = session("points1")
- st_hand1 = Request.Form("st_hand1")
- if points1 = "" then points1 = "0"
- if points1 <> "" then points1 = points1
- '----------Find Game----------'
- fp_sQry = "SELECT scoreboard.player1, scoreboard.player2 FROM scoreboard WHERE scoreboard.player1 = '" & player1 & "' and scoreboard.player2 = '" & player2 & "'"
- Set rs = conn.Execute(fp_sQry)
- if rs.EOF and rs.BOF then '----INSERT----
- sSQL = "INSERT into scoreboard (player1, player2, st_hand1) values ('" & player1 & "', '" & player2 & "', '" & sthand1 & "')"
- Set urs = conn.Execute(sSQL)
- urs.Close
- else '----------UPDATE ------------'
- sSQL = "UPDATE scoreboard SET st_hand1 = '" & st_hand1 & "'" & WHERE scoreboard.player1 = '" & player1 & "' and scoreboard.player2 = '" & player2
- Set irs = conn.Execute(sSQL)
- irs.close
- end if
- rs.close
- conn.close
- Response.Redirect ("results.asp")
- %>
Add Comment
Please, Sign In to add comment