% ' Declaring variables Dim message, data_source, con, sql_insert ' A Function to check if some field entered by user is empty Function ChkString(string) If string = "" Then string = " " ChkString = Replace(string, "'", "''") End Function ' Receiving values from Form nick = ChkString(Request.Form("nick")) navn = ChkString(Request.Form("navn")) alder = ChkString(Request.Form("alder")) klasse = ChkString(Request.Form("klasse")) motto = ChkString(Request.Form("motto")) hardware = ChkString(Request.Form("hardware")) i16c = ChkString(Request.Form("i16c")) u16c = ChkString(Request.Form("u16c")) pjat = ChkString(Request.Form("pjat")) lillebillede = ChkString(Request.Form("lillebillede")) stortbillede = ChkString(Request.Form("stortbillede")) data_source = "DRIVER={MySQL}; Server=mydb6.surf-town.net; Database=spoforum; Uid=spoaddi_php; Password=smovs;" sql_insert = "insert into 16cplayers (nick, navn, alder, klasse, motto, hardware, i16c, u16c, pjat, lillebillede, stortbillede) values ('" & nick & "', '" & navn & "', '" & alder & "', '" & klasse & "', '" & motto & "', '" & hardware & "', '" & i16c & "', '" & u16c & "', '" & pjat & "', '" & lillebillede & "', '" & stortbillede & "');" ' Creating Connection Object and opening the database Set con = Server.CreateObject("ADODB.Connection") con.Open data_source con.Execute sql_insert ' Done. Close the connection con.Close Set con = Nothing %>