strSQL = "Insert Into players (name, password) Values ('" & name & "', '" & pass & "')"
Halloj!
Nu har jag börjat ta tag i det här med registreringen och nu är det någon kod som strular (tell me something i dont know) :OO
iallafall, så här ser felmesset ut:
Kompileringsfel i Microsoft VBScript error '800a0409'
Oavslutad strängkonstant
/crimea bay/newcriminal.asp, line 20
strSQL = "Insert Into players (name, password) Values ('" & name & "', '" & pass & "')
--------------------------------------------------------------------------------------^
Och här är koden:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> Crimea Bay -- //Your dreams come true when you fight for them// </TITLE>
<LINK REL=STYLESHEET HREF="crimea.css" TYPE="text/css">
<META NAME="Author" CONTENT="Vincenzo, Don Ramon">
<META NAME="Keywords" CONTENT="Criminals, Servergame, Strategic game with a crime theme, Shotgun, Machinegun, Don Ramon, Something, Drugs, Prostitution, Fictive Crime, Live out your criminal side">
<META NAME="Description" CONTENT="Work your way up among the hotshots and dodge the cops in this strategic game with a mafia crime theme.">
</HEAD>
<BODY bgcolor=#33CCFF text=#000000 link=#000000 alink=#000000 vlink=#000000>
<%
Dim name, pass, strSQL
name = Request.Form("alias")
pass = Request.Form("pass")
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open "Driver={mySQL ODBC 3.51 Driver};Server=localhost;Option=16834;Database=crimea;"
strSQL = "Insert Into players (name, password) Values ('" & name & "', '" & pass & "')
Connect.Execute( strSQL)
Connect.Close
%>
<TABLE>
<TR>
<TD background="logo.jpg" width=424 height=238>
<SPAN ID="header"><BR><BR> Crimea Bay</SPAN></TD>
<TD>
<TABLE>
<TR>
<TD width=344 height=127 background="regbar.jpg">
<FONT FACE="Westminster" SIZE=1><I><B>
<A HREF="crimear.asp">Start</A>
<A HREF="registerr.asp">Register</A>
<A HREF="rulesr.asp">Rules</A>
</B>
</I></FONT>
</TD>
</TR>
<TR>
<TD height=124 width=344 background="designbar1.jpg"></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
<TABLE bordercolor=black border=0>
<TR>
<TD width=400></TD>
<TD width=500>
<SPAN ID="header">
<CENTER>
<U>Done!</U>
</CENTER>
</SPAN>
<BR><BR>
<SPAN ID="text">
You can log in <A HREF="crimear.asp">here</A> now with your ciminal alias.
</SPAN>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
Här har ni själva ASPn
<%
Dim name, pass, strSQL
name = Request.Form("alias")
pass = Request.Form("pass")
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open "Driver={mySQL ODBC 3.51 Driver};Server=localhost;Option=16834;Database=crimea;"
strSQL = "Insert Into players (name, password) Values ('" & name & "', '" & pass & "')
Connect.Execute( strSQL)
Connect.Close
%>
Som ni nog ser så har jag gjort en mycket liten grej ;) men den strular ändå :(
All hjälp är väldigt uppskattad!
:birp
Redigering:
Hmm......sorry om det blev lite mycket kod :r


