Jump to content

500 internal Server Error


Striped Fish2

Recommended Posts

Okay every time I run this code I with all the correct variables and querystrings in place I get an error. I checked for silly mistakes but I can't find any. Can some one show me where my code is wrong? Here it is:

<%user=Request.Cookies("usernamechar")item=Request.Querystring("item")thetype=Request.Querystring("type")thetype2="equip" & thetype & ""message1="Item%20could%20not%20be%20equipped"message2="because%20there%20is%20already%20an%20item%20in%20that%20slot"set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "D:\Hosting\5230803\html\access_db\DragonKwest.mdb"set rs = Server.CreateObject("ADODB.recordset")rs.Open "SELECT " & thetype2 & " FROM Characters WHERE Name='" & user & "'", connIf x.value="" thensql="UPDATE Characters SET " & thetype2 & "='" & item & "' WHERE Name = '" & user &"'"Elseresponse.redirect("inventory.asp?message=" & message1 & "" & message2 & ")End Ifrs.closeconn.Execute sql,Recordsaffectedsql2="DELETE FROM Hero_Items WHERE CharacterName='" & user & "' AND Item='" & item & "'"conn.Execute sql2,Recordsaffectedconn.closeResponse.Redirect("inventory.asp?message=" & item & "%20equipped")%>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...