<html>

<head></head>

<body>

<%

if request.querystring("serverhost") <> "" and request.querystring("user") <> "" then

user = request.querystring("user")
pass = request.querystring("pass")
database = user
serverhost = request.querystring("serverhost")

set conn = server.createobject("ADODB.connection")
conn.Open "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=" & serverhost & ";DATABASE=" & database & "; UID=" & user & "; PWD= " & pass & ";"

response.write "<b>Succesfully connected to the database!</b>"

conn.close

end if

%>

<form action="mysql.asp" method="get">

<p>
Username:<br>
<input type="text" name="user" value="<%=request.querystring("user")%>">
</p>

<p>
Password:<br>
<input type="text" name="pass" value="<%=request.querystring("pass")%>">
</p>

<p>
Server host:<br>
<input type="text" name="serverhost" value="<%=request.querystring("serverhost")%>"><br>
<input type="submit" value="Test connection!">
</p>

</form>

</body>
</html>