Submit scores to e-mail using asp

K

kate.white

Hi
I design and update the internal intranet for an insurance company and
have taught myself HTML and asp. I know enough to design feedback
forms, use java scripts and can just about submit information to a
databse but i dont know how to create a script to calculate a score of
a quiz i have created. I can submit the information via e-mail using
arial buttons to detrmin whether the answer is 'correct' or
'incorrect' but now i am wanting the script to count if the user
answers correct. Any advise?

I have never used a forum before so i hope i'm doing this right.

Thanks
Kate
 
K

kate.white

not enough information here to help you.

We don't know about your quiz or the formulas for your scoring so....

post some work to date and others may be able to assist on specific questions.







- Show quoted text -

The arial buttons on the html page are set to 'Correct' or 'Incorrect'
if they select the correct answer the string says 'correct'. What i
want to do is add all the correct answers together and total at the
bottom of the mail. Here is my asp script....


<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%OPTION EXPLICIT%>
<% Response.Buffer = true %>

<%

Dim fname, man, vq1, vq2, vq3, vq4, vq5, vq6, vq7, vq8, vq9, vq10,
strBody, objMail


fname = Request.Form("name")
man = Request.Form("manager")
vq1 = Request.Form("q1")
vq2 = Request.Form("q2")
vq3 = Request.Form("q3")
vq4 = Request.Form("q4")
vq5 = Request.Form("q5")
vq6 = Request.Form("q6")
vq7 = Request.Form("q7")
vq8 = Request.Form("q8")
vq9 = Request.Form("q9")
vq10 = Request.Form("q10")

strBody = ""
strBody = strBody & "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0
Transitional//EN"">" & vbCrlf
strBody = strBody & "<head>" & vbCrlf
strBody = strBody & "<meta http-equiv=""Content-Type"" content=""text/
html; charset=iso-8859-1"" />" & vbCrlf
strBody = strBody & "<style type=""text/css"">" & vbCrlf
strBody = strBody & "body {" & vbCrlf
strBody = strBody & "margin-left: 0px; margin-top: 0px; margin-right:
0px; margin-bottom: 0px;" & vbCrlf
strBody = strBody & "}" & vbCrlf
strBody = strBody & "#pagehead {" & vbCrlf
strBody = strBody & "font-family: ""Gill Sans""; color:
#FFFFFF; font-size: 36px;" & vbCrlf
strBody = strBody & "}" & vbCrlf
strBody = strBody & "#pagetitle {" & vbCrlf
strBody = strBody & "font-family: ""Gill Sans""; color:
#FFFFFF; font-size: 48px;" & vbCrlf
strBody = strBody & "}" & vbCrlf
strBody = strBody & "#bodytextlarge {" & vbCrlf
strBody = strBody & "color: #ccoo33; font-weight: bold; font-size:
18px; font-family: ""Gill Sans"";" & vbCrlf
strBody = strBody & "}" & vbCrlf
strBody = strBody & "#bodytext {" & vbCrlf
strBody = strBody & "color: #cc0033; font-weight: normal; font-
size: 18px;" & vbCrlf
strBody = strBody & "}" & vbCrlf
strBody = strBody & "</style>" & vbCrlf
strBody = strBody & "</head>" & vbCrlf
strBody = strBody & "<html><body>" & vbCrlf
strBody = strBody & "<table width=""100%"" cellpadding=""0""
cellspacing=""0"" border=""0"">" & vbCrlf
strBody = strBody & "<tr bgcolor=""#ccoo33"">" & vbCrlf
strBody = strBody & " <td align=""center"" valign=""top""
id=""pagetitle"" > Homeserve </td>" & vbCrlf
strBody = strBody & "</tr>" & vbCrlf
strBody = strBody & said:
Validation Quiz</td>" & vbCrlf
strBody = strBody & "</tr>" & vbCrlf
strBody = strBody & "<tr><td>&nbsp;</td></tr>" & vbCrlf
strBody = strBody & "<tr><td align=""center"" id=""bodytext"">The
following user submitted their validation quiz on " & now () & "</td></
tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td>&nbsp;</td></tr>" & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Name: " &
fname & "</td></tr>" & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Team
Manager: " & man & "</td></tr>" & vbCrlf & vbCrlf & vbCrlf
strBody = strBody & "<tr><td>&nbsp;</td></tr>" & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer
1: " & vq1 & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer
2: " & vq2 & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer
3: " & vq3 & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer
4: " & vq4 & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer
5: " & vq5 & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer
6: " & vq6 & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer
7: " & vq7 & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer
8: " & vq8 & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer
9: " & vq9 & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer
10: " & vq10 & "</td></tr>" & vbCrlf & vbCrlf & vbCrlf & vbCrlf
strBody = strBody & "<tr><td>&nbsp;</td></tr>" & vbCrlf
strBody = strBody & "<tr><td align=""center"" id=""bodytext"">Total
Score =...... (Out of 10) " & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr height=""150px""><td>&nbsp;</td></tr>" &
vbCrlf
strBody = strBody & "</table>" & vbCrlf
strBody = strBody & "</body></html>" & vbCrlf



Set objMail = Server.CreateObject("CDO.Message")
objMail.To = "(e-mail address removed)"
'ObjMail.Cc = "(e-mail address removed)"
objMail.From = "(e-mail address removed)"
objMail.Subject = "Homeserve Validation Quiz"
objMail.HTMLBody = strBody

objMail.Send

Set objMail = Nothing

Response.Redirect ("frame.html")
%>



This is part of my HTML script....


<form id="form1" name="form1" method="post" action="hs.asp">
<table width="100%" border="1">
<tr>
<td width="19%"><strong>Name</strong></td>
<td width="25%"><input name="name" type="text" id="name" /></
td>
<td width="56%" bgcolor="#CCCCCC">&nbsp;</td>
</tr>
<tr>
<td><strong>Team Manager </strong></td>
<td><input name="manager" type="text" id="manager" /></td>
<td bgcolor="#CCCCCC">&nbsp;</td>
</tr>
</table>
<table width="100%" border="1">
<tr>
<td bgcolor="#CCCCCC">&nbsp;</td>
</tr>
<tr>
<td class="style2">Q1. <a
href="mailto:[email protected]"
title="mailto:[email protected]" class="style4">When are
Landlord&rsquo;s Safety checks carried out?</a></td>
</tr>
<tr>
<td><p class="style3">
<input name="q1" type="radio" value="A -Correct" />
All year round</p>
<p class="style3">
<input name="q1" type="radio" value="B -Incorrect" />
April to September</p>
<p class="style3">
<input name="q1" type="radio" value="C -Incorrect" />
October to March</p> </td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
<tr>
<td class="style3"><strong>Q2. How much is the cover limit
for Chem Dry emergency repairs?</strong></td>
</tr>
<tr>
<td><p class="style3">
<input name="q2" type="radio" value="A -Incorrect" />
&pound;300</p>
<p class="style3">
<input name="q2" type="radio" value="B -Correct" />
&pound;500</p>
<p class="style3">
<input name="q2" type="radio" value="C -Incorrect" />
&pound;1000</p> </td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
<tr>
<td class="style3"><strong>Q3. If a Lloyds TSB Easy Home
Warranty Policy cannot be found using the Post Code search what
contact number should you call for customer service? </strong></td>
</tr>
<tr>
<td><p class="style3">
<input name="q3" type="radio" value="A -Incorrect" />
02476 527839</p>
<p class="style3">
<input name="q3" type="radio" value="B -Incorrect" />
02476 572128</p>
<p class="style3">
<input name="q3" type="radio" value="C -Correct" />
02476 527812</p>
</td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
<tr>
<td class="style3"><strong>Q4. If a Customer calls to
request a check be carried out on &lsquo;Water Damaged
Electrics&rsquo;, what should you advise the customer?</strong></td>
</tr>
<tr>
<td><p class="style3">
<input name="q4" type="radio" value="A -Correct" />
We can&rsquo;t send ops out until the electrics have been
given time to dry out</p>
<p class="style3">
<input name="q4" type="radio" value="B -Incorrect" />
Unless there&rsquo;s an Electrical breakdown we
won&rsquo;t send an engineer out</p>
<p class="style3">
<input name="q4" type="radio" value="C -Incorrect" />
Customer will need to claim for flood damaged electrics
from their&nbsp; Household insurers </p>
</td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
<tr>
<td class="style3"><strong>Q5. When further work is
identified during a routine service and the boiler is found to be
&lsquo;Beyond repair&rsquo; Which department deals with it?
<em>&nbsp;&nbsp;&nbsp;&nbsp; </em></strong></td>
</tr>
<tr>
<td><p class="style3">
<input name="q5" type="radio" value="A -Incorrect" />
CAD Gas</p>
<p class="style3">
<input name="q5" type="radio" value="B -Correct" />
Deployment</p>
<p class="style3">
<input name="q5" type="radio" value="C -Incorrect" />
Customer relations</p> </td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
<tr>
<td class="style3"><strong>Q6. Which of the following Post
Codes does NOT come within the M25 Zone?</strong></td>
</tr>
<tr>
<td><p class="style3">
<input name="q6" type="radio" value="A -Incorrect" />
RH1 - 9</p>
<p class="style3">
<input name="q6" type="radio" value="B -Incorrect" />
GU1 - 5</p>
<p class="style3">
<input name="q6" type="radio" value="C -Correct" />
MK1 - 4</p> </td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
<tr>
<td><span class="style3"><strong>Q7. </strong></
span><strong>What must you enter in the Customer&rsquo;s Reference
field when recording a Chem Dry claim?</strong></td>
</tr>
<tr>
<td><p class="style3">
<input name="q7" type="radio" value="A -Incorrect" />
Customer&rsquo;s Reference</p>
<p class="style3">
<input name="q7" type="radio" value="B -Incorrect" />
We don&rsquo;t handle Chem Dry claims</p>
<p class="style3">
<input name="q7" type="radio" value="C -Correct" />
Chem Dry reference</p> </td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
<tr>
<td class="style3"><strong>Q8.</strong> <strong>How many new
&lsquo;Repudiated&rsquo; Category / Subjects are there in Impact?</
strong></td>
</tr>
<tr>
<td><p class="style3">
<input name="q8" type="radio" value="A -Incorrect" />
6</p>
<p class="style3">
<input name="q8" type="radio" value="B -Correct" />
8</p>
<p class="style3">
<input name="q8" type="radio" value="C -Incorrect" />
10</p> </td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
<tr>
<td class="style3"><strong>Q9. When a Fixed Rate Plumbing
Contractor calls from site with a subsequent job, how much can he
expect to be paid for this 2nd Job?</strong></td>
</tr>
<tr>
<td><p class="style3">
<input name="q9" type="radio" value="A -Incorrect" />
&pound;48</p>
<p class="style3">
<input name="q9" type="radio" value="B -Incorrect" />
&pound;15</p>
<p class="style3">
<input name="q9" type="radio" value="C -Correct" />
&pound;36</p> </td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
<tr>
<td class="style3"><strong>Q10. What is the waiting period
from the initial commencement of a Lloyds TSB Easyhome Warranty
policy before a claim can be made</strong><strong>?</strong></td>
</tr>
<tr>
<td><p class="style3">
<input name="q10" type="radio" value="A -Incorrect" />
14 days</p>
<p class="style3">
<input name="q10" type="radio" value="B -Correct" />
30 days</p>
<p class="style3">
<input name="q10" type="radio" value="C -Incorrect" />
28 days</p> </td>
</tr>
</table>
<p>
<input name="Submit" type="submit"
onclick="YY_checkform('form1','q1[0]','#q','2','Please answer question
1','q1[2]','#q','2','Field \'q1[2]\' is not
valid.','q2[0]','#q','2','Please answer question
2','q3[0]','#q','2','Please answer Q3','q4[0]','#q','2','Please answer
question 4','q5[0]','#q','2','Please answer question
5','q6[0]','#q','2','Please answer question
6','q7[0]','#q','2','Please answer question
7','q8[0]','#q','2','Please answer question
8','q9[0]','#q','2','Please answer question
9','q10[0]','#q','2','Please answer question
10','name','#q','0','Please enter your
name','manager','#q','0','Please enter your Team Managers
name');return document.MM_returnValue" value="Submit" />
</p>
<p>&nbsp;</p>
</form>



I hope this makes more sense. Can anyone help please?


Thanks
Kate
 
E

Evertjan.

Jon Paal [MSMD] wrote on 10 jul 2007 in
microsoft.public.inetserver.asp.general:
Since you have the vq values collected from the form , why don't you
determine if it is correct and then simply add them together ?

Are you replying to something?

[please always quote on usenet]
 
E

Evertjan.

Jon Paal [MSMD] wrote on 10 jul 2007 in
microsoft.public.inetserver.asp.general:
Evertjan. said:
Jon Paal [MSMD] wrote on 10 jul 2007 in
microsoft.public.inetserver.asp.general:
Since you have the vq values collected from the form , why don't you
determine if it is correct and then simply add them together ?

Are you replying to something?

[please always quote on usenet]
yes, follow the thread...

[Please do not toppost on usenet]
Did you affirm that you replied to something,
or that you should always quote?

Could you please tell us which,
and, if the first, what the something was?

[please always quote on usenet]
Not all usenet servers keep or have yet available the previous posting,
so Netiquette rightly demands/advises you should.

[please do not quote signatures on usenet]
Good news readers automagically skip those signatures.
 
E

Evertjan.

Jon Paal [MSMD] wrote on 10 jul 2007 in
microsoft.public.inetserver.asp.general:
if you can't see the thread, then your problem is you need a better
newsreader.

Jon, it is not about me,
but about you not adhering to perfectly sensible Usenet Netiquette rules.

As I told you, postings are only temporarily available on usenet servers
and arrive not necessarily in the right sequence, so even the best
newsreader cannot read what is not available.

So it is only polite to adhere to the Netiquette.

I is like you are saying that it is perfectly sensible for you to drive on
the wrong side of the road, because you are driving a hummer.
 
K

kate.white

Jon Paal [MSMD] wrote on 10 jul 2007 in
microsoft.public.inetserver.asp.general:
if you can't see the thread, then your problem is you need a better
newsreader.

Jon, it is not about me,
but about you not adhering to perfectly sensible Usenet Netiquette rules.

As I told you, postings are only temporarily available on usenet servers
and arrive not necessarily in the right sequence, so even the best
newsreader cannot read what is not available.

So it is only polite to adhere to the Netiquette.

I is like you are saying that it is perfectly sensible for you to drive on
the wrong side of the road, because you are driving a hummer.







Okay hopefully I am using this forum correctly. I asked someone what
top posting and quote on usenet is....

So Jon paal


I got your message about 'Since you have the vq values collected from
the form , why don't you determine if it is correct and then simply
add them together ?'

This is what i don't know what to do? I have never created a script to
add things together and i don't know where to start. My work is self
taught or copied from out Web desiner at Walsall and i havent been
doing this very long. I do pick things up quite quickly. I just need
to know how to get the script to count each correct answer and then
add together to diplay a score on the e-mail. Can you help?

Many Thnaks
Kate
 
K

kate.white

fname = Request.Form("name")
man = Request.Form("manager")
vq1 = Request.Form("q1")
vq2 = Request.Form("q2")
vq3 = Request.Form("q3")
vq4 = Request.Form("q4")
vq5 = Request.Form("q5")
vq6 = Request.Form("q6")
vq7 = Request.Form("q7")
vq8 = Request.Form("q8")
vq9 = Request.Form("q9")
vq10 = Request.Form("q10")

' create user total score variable and inititalize= 0
'---------------------------------------------------------
TotalScore = 0

if vq1 = "insert correct answer for vq1 here" then Totalscore = TotalScore + 1

'... repeat for other questions
'--------------------------------------

'insert user's TotalScore into your output
'--------------------------------------------------






- Show quoted text -







Thanks Jon Paal your an absolute star!!!!
 
J

JohnWilliams.esquire

Thanks Jon Paal your an absolute star!!!!

Kate, I've just responded to your post on
microsoft.public.inetsdk.programming.scripting.vbscript and didn't
find your post on this newsgroup. Here's my reply for completeness:

If you're going to post code/HTML it's best to give a complete working
example as much as possible and then
people will spend minimum effort trying to reproduce the problem and
will be more inclined to help. Your code was missing a submit button,
closing </table> and </form> tags and the usual HTML header and body
tags.

Having said all that, I hope the following code does what you want.
The key is to use an array instead of separate variables to store the
answers. Then use a For Next loop to scan the array for correct
answers and keep a running total.

My web host doesn't support CDO.Message and .HTMLBody, so you need to
modify the following code slightly for your system.

---------- quiz.asp ----------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>quiz.asp</title>
</head>

<body>
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
'option explicit

If Request.Form("POSTED") Then

Dim fname, man, strBody, objMail
Dim vqArray(9), i, numCorrect

fname = Request.Form("name")
man = Request.Form("manager")
vqArray(0) = Request.Form("q1")
vqArray(1) = Request.Form("q2")
vqArray(2) = Request.Form("q3")
vqArray(3) = Request.Form("q4")
vqArray(4) = Request.Form("q5")
vqArray(5) = Request.Form("q6")
vqArray(6) = Request.Form("q7")
vqArray(7) = Request.Form("q8")
vqArray(8) = Request.Form("q9")
vqArray(9) = Request.Form("q10")

numCorrect = 0
For i = 0 To 9
If Instr(vqArray(i),"-Correct") Then numCorrect = numCorrect + 1
Next

strBody = ""
strBody = strBody & "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0
Transitional//EN"">" & vbCrlf
strBody = strBody & "<head>" & vbCrlf
strBody = strBody & "<meta http-equiv=""Content-Type"" content=""text/
html; charset=iso-8859-1"" />" & vbCrlf
strBody = strBody & "<style type=""text/css"">" & vbCrlf
strBody = strBody & "body {" & vbCrlf
strBody = strBody & "margin-left: 0px; margin-top: 0px; margin-right:
0px; margin-bottom: 0px;" & vbCrlf
strBody = strBody & "}" & vbCrlf
strBody = strBody & "#pagehead {" & vbCrlf
strBody = strBody & "font-family: ""Gill Sans""; color: #FFFFFF; font-
size: 36px;" & vbCrlf
strBody = strBody & "}" & vbCrlf
strBody = strBody & "#pagetitle {" & vbCrlf
strBody = strBody & "font-family: ""Gill Sans""; color: #FFFFFF; font-
size: 48px;" & vbCrlf
strBody = strBody & "}" & vbCrlf
strBody = strBody & "#bodytextlarge {" & vbCrlf
strBody = strBody & "color: #ccoo33; font-weight: bold; font-size:
18px; font-family: ""Gill Sans"";" & vbCrlf
strBody = strBody & "}" & vbCrlf
strBody = strBody & "#bodytext {" & vbCrlf
strBody = strBody & "color: #cc0033; font-weight: normal; font-size:
18px;" & vbCrlf
strBody = strBody & "}" & vbCrlf
strBody = strBody & "</style>" & vbCrlf
strBody = strBody & "</head>" & vbCrlf
strBody = strBody & "<html><body>" & vbCrlf
strBody = strBody & "<table width=""100%"" cellpadding=""0""
cellspacing=""0"" border=""0"">" & vbCrlf
strBody = strBody & "<tr bgcolor=""#ccoo33"">" & vbCrlf
strBody = strBody & " <td align=""center"" valign=""top""
id=""pagetitle"" > Homeserve </td>" & vbCrlf
strBody = strBody & "</tr>" & vbCrlf
strBody = strBody & "<tr bgcolor=""#ccoo33"">" & vbCrlf
strBody = strBody & " <td align=""center"" id=""pagehead"">Validation
Quiz</td>" & vbCrlf
strBody = strBody & "</tr>" & vbCrlf
strBody = strBody & "<tr><td>&nbsp;</td></tr>" & vbCrlf
strBody = strBody & "<tr><td align=""center"" id=""bodytext"">The
following user submitted their validation quiz on " & now () &
"</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td>&nbsp;</td></tr>" & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Name: " &
fname & "</td></tr>" & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Team
Manager: " & man & "</td></tr>" & vbCrlf & vbCrlf & vbCrlf
strBody = strBody & "<tr><td>&nbsp;</td></tr>" & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer 1:
" & vqArray(0) & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer 2:
" & vqArray(1) & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer 3:
" & vqArray(2) & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer 4:
" & vqArray(3) & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer 5:
" & vqArray(4) & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer 6:
" & vqArray(5) & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer 7:
" & vqArray(6) & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer 8:
" & vqArray(7) & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer 9:
" & vqArray(8) & "</td></tr>" & vbCrlf & vbCrlf
strBody = strBody & "<tr><td align=""left"" id=""bodytext"">Answer
10: " & vqArray(9) & "</td></tr>" & vbCrlf & vbCrlf & vbCrlf &
vbCrlf
strBody = strBody & "<tr><td>&nbsp;</td></tr>" & vbCrlf
strBody = strBody & "<tr><td align=""center"" id=""bodytext"">Total
Score = " & numCorrect & " (Out of 10) " & "</td></tr>" &
vbCrlf & vbCrlf
strBody = strBody & "<tr height=""150px""><td>&nbsp;</td></tr>" &
vbCrlf
strBody = strBody & "</table>" & vbCrlf
strBody = strBody & "</body></html>" & vbCrlf

'Set objMail = Server.CreateObject("CDO.Message")
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.To = "(e-mail address removed)"
'ObjMail.Cc = "(e-mail address removed)"
objMail.From = "(e-mail address removed)"
objMail.Subject = "Homeserve Validation Quiz"
objMail.BodyFormat = 0 '(0=MIME 1=Text)
'objMail.HTMLBody = strBody
objMail.Body = strBody

objMail.Send

Set objMail = Nothing

Response.Redirect "quiz-submitted.html"

Else
%>

<form id="form1" name="form1" method="post" action="quiz.asp">
<input type="hidden" name="POSTED" value="true" />

<table width="100%" border="1">
<tr>
<td width="19%"><strong>Name</strong></td>
<td width="25%"><input name="name" type="text" id="name" /></td>
<td width="56%" bgcolor="#CCCCCC">&nbsp;</td>
</tr>
<tr>
<td><strong>Team Manager </strong></td>
<td><input name="manager" type="text" id="manager" /></td>
<td bgcolor="#CCCCCC">&nbsp;</td>
</tr>
</table>
<table width="100%" border="1">
<tr>
<td bgcolor="#CCCCCC">&nbsp;</td>
</tr>
<tr>
<td class="style2">Q1. When are Landlord&rsquo;s Safety checks
carried out?</a></td>
</tr>
<tr>
<td><p class="style3">
<input name="q1" type="radio" value="A -Correct" />All year round</
p>
<p class="style3">
<input name="q1" type="radio" value="B -Incorrect" />
April to September</p>
<p class="style3">
<input name="q1" type="radio" value="C -Incorrect" />
October to March</p> </td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
<tr>
<td class="style3"><strong>Q2. How much is the cover limit for Chem
Dry emergency repairs?</strong></td>
</tr>
<tr>
<td><p class="style3">
<input name="q2" type="radio" value="A -Incorrect" />&pound;300</
p>
<p class="style3">
<input name="q2" type="radio" value="B -Correct" />&pound;500</p>
<p class="style3">
<input name="q2" type="radio" value="C -Incorrect" />&pound;1000</
p>
</td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
<tr>
<td class="style3"><strong>Q3. If a Lloyds TSB Easy Home
Warranty Policy cannot be found using the Post Code search what
contact number should you call for customer service? </strong></td>
</tr>
<tr>
<td><p class="style3">
<input name="q3" type="radio" value="A -Incorrect" />02476 527839</
p>
<p class="style3">
<input name="q3" type="radio" value="B -Incorrect" />02476 572128</
p>
<p class="style3">
<input name="q3" type="radio" value="C -Correct" />02476 527812</p>
</td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
<tr>
<td class="style3"><strong>Q4. If a Customer calls to
request a check be carried out on &lsquo;Water Damaged
Electrics&rsquo;, what should you advise the customer?</strong></td>
</tr>
<tr>
<td><p class="style3">
<input name="q4" type="radio" value="A -Correct" />
We can&rsquo;t send ops out until the electrics have been
given time to dry out</p>
<p class="style3">
<input name="q4" type="radio" value="B -Incorrect" />
Unless there&rsquo;s an Electrical breakdown we
won&rsquo;t send an engineer out</p>
<p class="style3">
<input name="q4" type="radio" value="C -Incorrect" />
Customer will need to claim for flood damaged
electrics from their&nbsp; Household insurers </p>
</td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><span class="style3"></span></td>
</tr>
</tr>
</table>
</form>

<%
End If
%>

</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top