flash quiz results l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Flash Quiz Results PowerPoint Presentation
Download Presentation
Flash Quiz Results

Loading in 2 Seconds...

play fullscreen
1 / 8

Flash Quiz Results - PowerPoint PPT Presentation


  • 362 Views
  • Uploaded on

Flash Quiz Results. Storing Flash Quiz Results in an Access Database. Storing Quiz Results. Storing quiz results is a four-step process. First, you identify the user who owns the HTTP session. Second, you send this user to the page that administers the quiz.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Flash Quiz Results' - Ava


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
flash quiz results

Flash Quiz Results

Storing Flash Quiz Results in an Access Database

storing quiz results
Storing Quiz Results
  • Storing quiz results is a four-step process.
  • First, you identify the user who owns the HTTP session.
  • Second, you send this user to the page that administers the quiz.
  • Third, you program the quiz to post the results.
  • Fourth, you receive the results and save them in the database.
identifying the user
Identifying the User
  • There are two ways to identify the user.
  • First, you can have users log on through the Dreamweaver login server behavior presented in Class 6.
  • Second, you can use a form to prompt an anonymous user for some kind of identification, such as an e-mail address, and save it in a session variable as you learned in Class 8.
administering the quiz
Administering the Quiz
  • You administer the quiz by embedding it on an ASP page.
  • If you are using the Dreamweaver Login behavior, you secure the quiz by putting on this page the server behavior called User Authentication > Restrict Access to Page.
posting the quiz results
Posting the Quiz Results
  • On the last screen of the quiz, you need to put a button which, when pressed, launches a script that posts the results to the ASP page to which you will take the user upon completion of the quiz.
  • The Action Script you add to the last frame of the quiz is as follows:report_btn.onRelease = function() { score = QuizTrack.percent_format; trace(score); getURL(“my_quiz_results.asp", "_self", "POST");}
storing the results in the db
Storing the Results in the DB
  • To store the results in the database, your Access database needs to contain a table in which you will store the quiz results.
  • On the page that will store the quiz results, you create a data binding to the Request object that contains the score, and to the Session object that contains the username.
data grab script
Data Grab Script
  • You grab hold of the data through Request(“score”) and Session(”MM_Username”)
  • For example: The result of the quiz was <%= Request("score") %> for username <%= Session("MM_Username") %>
  • This writes a message in the form of:The result of the quiz was 33% for username Elvis.
database insertion script
Database Insertion Script

<%connection = Server.CreateObject("ADODB.Connection");connection.mode = 3; //read-write modesConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data “+ “Source=C:\\TopSecret\\results.mdb;Persist Security “+ “Info=False";connection.Open(sConnectionString);//create the sql query to insert the datasQuery = "INSERT INTO SecretQuiz (UserName, Score) “ + "Values(“ + "'" + Session("MM_username") + "', “ + "'" + Request("score") + "')";connection.Execute(sQuery);if (connection.errors.count > 0) Response.Write("<br>There was a connection error.");else Response.Write("<br>The score was recorded.");connection.Close();

%>