title: How to check if value returns true at line 11 in question.php?
body: <p>I have a program that users can create their own questions to answer it is made up of two files j.php creates the question.And question.php is supposed return it to display the question  and check if the value returns true or false.But  question.php it has a problem at line 11 it can't return if value is true or false.In this case i used a question: ""What is my name?"
  And answer :"Nick".The value returns false.</p>
  
  <p>This creates the text file and then redirects the user to question.php 
  Where the question with a text box and submit button.
  file1 j.php
  And for this example i would ask the question.</p>
  
  <p>Question you want ask the person:What is my name?
  Answer to  the question for user:Nick</p>
  
  <pre><code>file1 j.php
  &lt;?php
  
  if(isset($_POST['submit'])) {
  
      $question1 = $_POST['name'];
      $question2 = $_POST['age'];
  
      $file = fopen( "question.txt", "w+" ) or die( "file not open" );
      $s = $question1 . "," . $question2 . "\n";
      fputs($file, $s)or die("Data not written");
  
      // Here - redirect to questions.php to display the contents.
      header('Location: questions.php');
      die;
  }
  else{
  echo
  '&lt;center&gt;
   &lt;form action = "j.php"  method = "post"&gt;
    Question you want ask the person &lt;input  type  = "text" name="name"&gt; &lt;br&gt;
   Answer to the question for user&lt;input type = "text" name = "age"&gt;&lt;br&gt;
      &lt;br&gt;&lt;input type = "submit" name = "submit" value = "Make Question"&gt;
      &lt;/form&gt;
      &lt;/center&gt;';}
  ?&gt;```
  
  file 2 question.php
  
  
  1 &lt;?php
  2 $myFile = "question.txt";
  3 $fh = fopen($myFile, 'r');
  4 $theData = fread($fh, filesize($myFile));
  5 fclose($fh);
  6 $arr =explode(",",$theData);
  7 $x=$arr[0];
  8 $y = $arr[1];
  9 if($_POST['submit']) {
  10  $text = $_POST["name"];
  11  if ( $text ===$y ) {
  12
  13
  14
  14      echo "&lt;font color = 'green'&gt;Your answer is correct&lt;/font&gt;";
  16  } if($text &lt;&gt; $y) {
  17      echo "answer not correct";
  18  }
  19
  20   }
  21
  22
  23 ?&gt;
  24&lt;center&gt;
  25  &lt;form  method = "post"&gt;
  26      &lt;?php echo $x  ?&gt; &lt;input  type  = "text" name="name"&gt; &lt;br&gt;
  27      &lt;input type = "submit" name = "submit" value = "Submit answer"&gt;
  28  &lt;/form&gt;
  29&lt;/center&gt;
  30 output now:"answer not correct"
  31 expected output: "Your answer is correct"
  
  
  </code></pre>