Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>The Wammi Results</title>
- <!-- <link rel="stylesheet" type="text/css" href="style.css"> //-->
- </head>
- <body>
- <h1>Wammi results</h1>
- <p>The Wammi questionnaire had the following results</p>
- <table border="1">
- <tr>
- <th>wammi factor</th>
- <th>mean</th>
- <th>std. dev.</th>
- </tr>
- <?php
- /************************************
- * verbinding maken met de database *
- * *
- * opdracht 9a *
- ************************************/
- $server = "localhost";
- $username = "root";
- $password = "";
- mysql_connect($server, $username, $password);
- $dbname = "wammi";
- mysql_select_db($dbname);
- /********************************
- * query opstellen en uitvoeren *
- * *
- * opdracht 9b *
- ********************************/
- $query = "SELECT avg(rating.score), std(rating.score)
- FROM rating, wammifactor, statement
- WHERE wammifactor.factorcode = statement.factorcode AND statement.statementcode = rating.statementcode
- GROUP BY wammifactor.name;";
- echo $query;
- $result = mysql_query($query); // de query wordt uitgevoerd en de uitkomst wordt in $result gezet.
- /**********************************
- * resultaten op het scherm tonen *
- * *
- * opdracht 9c *
- **********************************/
- $totalescore = 0; // nodig om global usability uit te rekenen
- $aantalfactoren = 0; // nodig om global usability uit te rekenen
- echo "<table>";
- while($row = mysql_fetch_array($result)) // Dit is een loop die rij voor rij het resultaat afgaat. De loop blijft doorgaan totdat er geen rijen meer zijn. De resultaten worden in de array $row gezet.
- {
- $aantalfactoren = $aantalfactoren + 1; // Voor iedere rij wordt er 1 bij dit getal opgeteld. Dit is nodig om global usability uit te rekenen
- $totalescore = $totalescore + $row['AVG(score)']; // Voor iedere rij wordt de score bij dit getal opgeteld. Dit is nodig om global usability uit te rekenen
- $name = $row['name']; // De naam van de wammifactor
- $score = $row['AVG(score)']; // De score van deze wammifactor
- $std = $row['STD(score)']; // De standaard deviatie van deze score
- // zet je code voor opdracht 9c hier
- // de variabelen die je hier gebruikt heten $name, $score en $std
- echo "<tr>
- <td>".$name."</td>
- <td>".$score."</td>
- <td>".$std."</td>
- </tr>";
- }
- echo "</table>";
- /****************************************
- * global usability op het scherm tonen *
- * *
- * opdracht 9d *
- ****************************************/
- ?>
- </table>
- <h3>Mean</h3>
- <p>This is the numerical average of the individual scores your users have rated you at</p>
- <h3>Standard deviation</h3>
- <p>The standard deviation expresses the amount of variability in your data. If all your users are agreed on their evaluations of your website, the standard deviations will be smaller. If your users have divergent opinions, the standard deviations will be much greater. It is not uncommon to find that the standard deviations are larger for some scales than for others. This indicates that there are differences in the amount of agreement between users about these scales</p>
- </body>
- </html>
Add Comment
Please, Sign In to add comment