Advertisement
Sax

Untitled

Sax
May 4th, 2015
561
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.75 KB | None | 0 0
  1. <?php
  2.  
  3. $site = "localhost";
  4. $user = "sax";
  5. $pass = "asdf1234";
  6. $dbname = "preguntas";
  7. $tbname = "preguntas";
  8.  
  9. $dblink = mysqli_connect($site, $user, $pass, $dbname);
  10.  
  11. if (mysqli_connect_errno()){
  12.     echo "Fail dood!\n" .  mysqli_connect_error();
  13.     exit();
  14. }
  15.  
  16.  
  17.  
  18.  
  19. //ask for something like this $row[14][1];
  20.  
  21. //Inicia Quizz
  22.  
  23. //Pide grupo inicial
  24. $resource = mysqli_query($dblink, "SELECT * FROM $tbname WHERE Tier=0");
  25. $row = mysqli_fetch_all($resource);
  26. //Muestra grupo inicial
  27. print_r($row);
  28. //Multiply por Ponderación
  29. foreach ($row as $key => $value) {
  30.     # code...
  31. }
  32. //calcular y mostrar porcentaje de preguntas
  33.  
  34. //pedir siguiente tier
  35.  
  36. //mostrar siguiente tier
  37.  
  38. //muestra tier nuevo
  39.  
  40. //sumar y mostrar resultados
  41.  
  42. //graph
  43. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement