26. januar 2001 - 19:58
#4
Og selvfølgelig skal det også stå. Databasen er sendt til ng.
<%
if request.querystring(\"gender\")<>\"\" and request.querystring(\"birthyear\")<> \"\" and _
request.querystring(\"likedesign\")<>\"\" and Request.QueryString(\"easynavigate\")<>\"\" _
and Request.QueryString(\"tutorial\")<>\"\" then
set dbobj=Server.CreateObject(\"ADODB.connection\")
dbobj.open \"questionnairedsn\"
set uAgent=request.ServerVariables(\"HTTP_USER_AGENT\")
if inStr(uAgent, \"4.\")>0 then
userAgent=uAgent
else
userAgent=\"The browser is older than IE 4.0\"
end if
set language=request.ServerVariables(\"HTTP_ACCEPT_LANGUAGE\")
sqlstr=\"INSERT INTO questiontable (UserInfo, language, gender, birthyear, likedesign, tutorial, easynavigate, answertosubjects, subjectcomment, information, infocomment, functions, functioncomment, comments) select \'\" _
& userAgent & \"\' as UserInfo, \'\" _
& language & \"\' as language, \'\" _
& Request.querystring(\"gender\") & \"\' as gender, \'\" _
& Request.querystring(\"birthyear\") & \"\' as birthyear, \'\" _
& Request.querystring(\"likedesign\") & \"\' as likedesign, \'\" _
& Request.QueryString(\"tutorial\") & \"\' as tutorial, \'\" _
& Request.querystring(\"easynavigate\") & \"\' as easynavigate, \'\" _
& Request.QueryString(\"answertosubjects\") & \"\' as answertosubjects, \'\" _
& Request.QueryString(\"subjectcomment\") & \"\' as subjectcomment, \'\" _
& Request.QueryString(\"information\") & \"\' as information, \'\"_
& Request.QueryString(\"infocomment\") & \"\' as infocomment, \'\" _
& Request.QueryString(\"functions\") & \"\' as functions, \'\" _
& Request.QueryString(\"funtioncomment\") & \"\' as functioncomment, \'\" _
& Request.querystring(\"comments\") & \"\' as comments;\"
dbobj.execute(sqlstr)
dbobj.close
set dbobj=nothing
sqlstr=\"\"
Response.redirect(\"ThankYou.asp\")
else
%>
<script language=\"JScript\">
alert(\"Please answer the questions before submitting. Thank you.\")
</script>
<%
end if
%>
<HTML>
<HEAD>
<TITLE>Questionnaire</TITLE>
</HEAD>
<BODY background=\"bg.gif\" bgproperties=\"fixed\">
<img src=\"ideal.gif\">
<form><b><font color=\"5844A8\">
Please choose:<p>
<SELECT NAME=\"gender\">
<OPTION>Gender ?
<OPTION>Male
<OPTION>Female
</SELECT></p><p>
<SELECT NAME=\"birthyear\">
<OPTION>Birthyear?
<OPTION>1920-1929
<OPTION>1930-1939
<OPTION>1940-1949
<OPTION>1950-1959
<OPTION>1960-1964
<OPTION>1965-1969
<OPTION>1970-1974
<OPTION>1975-1980
<OPTION>1981-1984
<OPTION>1985-1989
<OPTION>1990-
</SELECT></p><br>
<p>
<u><b>What do you think about the site:</u></b><br>
Do you like the design?<br>
Yes <input type=\"radio\" name=\"likedesign\" value=\"like-site-yes\">
No <input type=\"radio\" name=\"likedesign\" value=\"like-site-no\">
Neutral <input type=\"radio\" name=\"likedesign\" value=\"like-site-no-opinion\"><br>
<br>
Did you get help from the tutorial?<br>
Yes <input type=\"radio\" name=\"tutorial\" value=\"tutorial-help-yes\">
No <input type=\"radio\" name=\"tutorial\" value=\"tutorial-help-no\">
I couldn\'t use it <input type=\"radio\" name=\"tutorial\" value=\"tutorial-no-use\"><br>
<br>
Do you find it easy to navigate at ?<br>
Yes <input type=\"radio\" name=\"easynavigate\" value=\"easy-navigate-yes\">
No <input type=\"radio\" name=\"easynavigate\" value=\"easy-navigate-no\">
Neutral <input type=\"radio\" name=\"easynavigate\" value=\"easy-navigate-no-opinion\"><br>
<br>
Are there any subjects which you cannot<br>
find an answer to?<br>
Yes <input type=\"radio\" name=\"answertosubjects\" value=\"can-find-answers\">
No <input type=\"radio\" name=\"answertosubjects\" value=\"cannot-find-answers\"><br>
If Yes, please tell us which:<br>
<textarea name=\"subjectcomment\"cols=35 rows=4 ></textarea><br>
<br>
Do you think it is easy to find the information<br>
that you need to deal at ?<br>
Yes <input type=\"radio\" name=\"information\" value=\"easy-find-info-yes\">
No <input type=\"radio\" name=\"information\" value=\"easy-find-info-no\"><br>
If No, please comment:<br>
<textarea cols=35 rows=4 name=\"infocomment\"></textarea><br>
<br>
Do you miss any functionality?<br>
Yes <input type=\"radio\" name=\"functions\" value=\"functions-OK\">
No <input type=\"radio\" name=\"functions\" value=\"functions-not-OK\"><br>
If Yes, please comment:<br>
<textarea cols=35 rows=4 name=\"functioncomment\"></textarea>
<br>
<br>
Please feel free to comment on <br>
or put in suggestions for improvements:<br>
<textarea name=\"comments\" cols=\"35\" rows=\"4\"></textarea><br>
<br>
<p><input type=\"submit\" name=\"submit\" value=\"Send your answers\"></p>
</form>
</BODY>
</HTML>