473,657 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Save score into database

1 New Member
Hi u all,

i've made a 10 paged asp quiz. at the end of the quiz u will recieve a score.
the script is shown below. my answer = how can i save this score into a database?

<!-- #include file="functions .asp" -->

<% function content %>


<%
session.timeOut = 45
call storeAnswers()
%>

<!-- Begin Sitestat4 code -->
<script language="JavaS cript1.1">
<!--
function sitestat(ns_l){ ns_l+="&ns__t=" +new Date().getTime( );ns_pixelUrl=n s_l;
if(document.ima ges){ns_1=new Image();ns_1.sr c=ns_l;}else
document.write( "<img src="+ns_l+" width=1 height=1>");}
sitestat("kenni stest");
//-->
</script><noscrip t>
<img src="kennistest " width=1 height=1>
</noscript>
<!-- End Sitestat4 code -->


<span class="question " >Score</span>
<p>
<% select case calculateScore( ) %>
<% case 1,2,3,4,5 %>
Jammer, u heeft maar <% =calculateScore () %> vraag/vragen goed beantwoord.
<br /><br />
<b>Hou uw marktkennis op peil!</b>
<br /><br />
Neem nu een <a href="/aanmelden/inschrijven.asp " style="text-decoration:none ;" ><strong>gratis </strong></a> bla bla bla
</p>
<% case else %>
Gefeliciteerd, u heeft <% =calculateScore () %> vragen goed beantwoord!
<br /><br />
<b>Wilt u uw marktkennis op peil houden? </b>
<br /><br />
Neem dan nu een <a href="/aanmelden/inschrijven.asp " style="text-decoration:none ;" ><strong>gratis </strong></a> bla bla bla<% end select %>

<!--
U heeft <b class="score" ><% =(10-calculateScore( )) * 10 %>%</b> van de vragen foutief beantwoord.
</p>
oude score
<p>
Uw marktkennis is te beoordelen met rapportcijfer<s up>*</sup> <b class="score" ><% =calculateScore () %></b>.
</p>

Help me out if u can.
May 24 '07 #1
1 1677
jhardman
3,406 Recognized Expert Specialist
Welcome to the scripts DN. Here is a useful tutorial that walks you thru the basic steps of connecting to and manipulating a database using ADO (a built-in active-X component).

Jared
May 24 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
1405
by: hazz | last post by:
if i have a table record called Rule 1 with 1. table name 2. table column name 3. operator (>,< =) 4. value (0 to n) 5. score how could I create code to create a rule automatically so that i could create an object to compare to these rules in the database.
6
4509
by: ShihChengYu | last post by:
Dear All: I encounter one problem when I want to implement my thought. My thought is that user want to search a record of someone but maybe user would type wrong name or spell name wrong. I wish to compare the string which user inputed to the database column using "Socre Method". "Score Method" has a variable "grade" to accumulate the score. I want to convert the string to char array, and compare the char one by one. If the string is...
54
6607
namcintosh
by: namcintosh | last post by:
First of all, here is my program: #include <iostream> #include <conio> using namespace std; //Function prototype void getscore(int&, int&, int&, int&, int&); void findLowest (int, int, int, int, int, int); int main()
3
1536
by: I Hate My Computer | last post by:
Hi, I was wanting to make a game with the ability to save the level and the score. I would also like it to be able to load that saved game. Lastly I would like it to be able to save a high score list and display it later. If you can help I need this before 5/28/07. Thanks Quick help is greatly appreciated!
5
2985
by: eliana82 | last post by:
I have problems calculating score percentages within groups. I have created a boat program in access where the information provided is name, team, boat and score. The first query I've done is to produce the ranking according to the score, which worked fine. The second query is about giving 100% to the highest score per boat and then taking the percentage of that score and calculate the rest of the team scores according to that score;...
5
1557
by: paitoon | last post by:
Hello, I have problem to add vote to the data base . In the form i have radio button to choose to rate the score 1 2 3 4 5 ....and when i click to submit this the score in database is changed by the score i chose but it not plus it selv....what should i do. here is my code : $id_vdo=$_POST; $name_vdo=$_POST; $rate=$_POST; include "connect.php";
4
2343
by: gaya12 | last post by:
In ASP and using Ms access. I have a form which asks users to input some details. The details entered by the user will stored in a access database and also there is a calculation based on the input. The results of the overall score should display to the user inmediatly and that result also should be stored in the database, I will explain this by a small example. Age : ............ Years as Employee : ......... If the user enter age as...
1
3396
by: Flanders | last post by:
I have developed a small arcade game with the help of a few VB books. A scoring system was implemented in the design of the game but I as hoping that some one would be able to instruct me on how display the score at the end of the game. At the moment when a player finishes the game I have a window displaying "Puzzle Solved." If I could display the players score under this in the same window would be great. This is a quick copy and paste...
6
9089
by: Mblade | last post by:
O.k. guys trying to teach myself in VB6 to start i am writing a math program for my daughter but i am having trouble with my code to keep score. the program is two random numbers that pop up in 2 txtboxes and a 3 txtbox for the answer on a 3 min timer what i want to do is keep track of how many she got right and display it at the end of the 3 min. here is the code any info you code give will be helpful and if you see any other mistakes in the...
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8823
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8603
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7320
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1604
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.