MilaDimitrovaa

return.php

Nov 22nd, 2021
1,614
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.73 KB | None | 0 0
  1. <?php
  2.    session_start();
  3.    echo "<pre>";
  4.     echo var_dump($_GET);
  5.     echo "</pre>";
  6.  
  7.     $counter = 0;
  8.  
  9.     if(isset($_GET["question1"])){
  10.         $answer = $_GET["question1"];
  11.         if($answer == "681"){
  12.             $counter++;
  13.         }
  14.     }
  15.  
  16.     if(isset($_GET["question2"])){
  17.         $answer = $_GET["question2"];
  18.         if($answer == "Paisii"){
  19.             $counter++;
  20.         }
  21.     }
  22.  
  23.     if(isset($_GET["question3"])){
  24.         $answer = $_GET["question3"];
  25.         if($answer == "863"){
  26.             $counter++;
  27.         }
  28.     }
  29.  
  30.     if(isset($_GET["question4"])){
  31.         $answer = $_GET["question4"];
  32.         if($answer == "Boris"){
  33.             $counter++;
  34.         }
  35.     }
  36.  
  37.     if(isset($_GET["question5"])){
  38.         $answer = $_GET["question5"];
  39.         if($answer == "bqlo"){
  40.             $counter++;
  41.         }
  42.     }
  43.  
  44.     if(isset($_GET["question6"])){
  45.         $answer = $_GET["question6"];
  46.         if($answer == "Cvetan"){
  47.             $counter++;
  48.         }
  49.     }
  50.  
  51.     if(isset($_GET["question7"])){
  52.         $answer = $_GET["question7"];
  53.         if($answer == "Konstantin"){
  54.             $counter++;
  55.         }
  56.     }
  57.  
  58.     if(isset($_GET["question8"])){
  59.         $answer = $_GET["question8"];
  60.         if($answer == "Sofronii"){
  61.             $counter++;
  62.         }
  63.     }
  64.  
  65.     if(isset($_GET["question9"])){
  66.         $answer = $_GET["question9"];
  67.         if($answer == "Krum"){
  68.             $counter++;
  69.         }
  70.     }
  71.  
  72.     if(isset($_GET["question10"])){
  73.         $answer = $_GET["question10"];
  74.         if($answer == "Asen"){
  75.             $counter++;
  76.         }
  77.     }
  78.  
  79.     $_SESSION['counter'] = $counter;
  80.  
  81.  
  82.     header('Location: http://localhost:8080/Homework2/index.php');
  83.  
  84.  
  85. ?>
Advertisement
Add Comment
Please, Sign In to add comment