title: Text is not changing when is being read
body: <p>I am trying to create an interactive program where users make  the questions with text boxes  using text files.But i am at a really early stage  where i can create  text file with 2 lines one of them would be the question and the answer.And  i have two php files.One of them create the text files.The other one is supposed to read it and display it on screen when tapped because form action= "questions.php". But for some reason the text displays but does not change</p>
  
  <p>j.php File 1 it is trying to create textfile.</p>
  
  <pre><code>&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");
  
        }
  
  else{
  echo
  '&lt;center&gt;
   &lt;form action = "questions.php"  method = "post"&gt;
    Question you want ask the person &lt;input  type  = "text" name="name"&gt; &lt;&lt;br&gt;
      Answer&lt;input type = "text" name = "age"&gt;&lt;br&gt;
      &lt;input type = "submit" name = "submit" value = "Make Question"&gt;
      &lt;/form&gt;
      &lt;/center&gt;';}
  ?&gt;
  </code></pre>
  
  <p>expected ouput it makes the file: question.txt</p>
  
  <p>questions.php file2  That is supposed to read and display the newly written data.</p>
  
  <pre><code>&lt;?php
  
  
  $myfile = file_get_contents ("question.txt");
  echo $myfile;
  
  ?&gt;
  </code></pre>
  
  <p>expected output it is supposed to read the new text</p>