title: Issue with PHP in Safari but not in Chrome
body: <p>I've earlier received an answer and solution in this post <a href="//stackoverflow.com/questions/33955825/show-an-uploaded-image-in-php" rel="nofollow">here</a> and have therefore (almost) completed  my school task. </p>
  
  <p>However, I have now found another problem when it comes to the choice of browser. </p>
  
  <p>When I look at the overview.php in Safari, it looks like this:</p>
  
  <p><img src="//imgur.com/LM40iNV.png" alt="Link to Imgur"> </p>
  
  <p>As you can see in the image, whenever I use Safari to do the entries, it shows all the information as blank spaces in the first five rows, but the next one (in the bottom) has all the correct information.</p>
  
  <p>When I use Google Chrome, I have no problems at all, as you can see here: 
  <img src="//imgur.com/4wBS55A.png" alt="Link to Imgur"></p>
  
  <p>So my question is, what part of my code is it that makes Safari do the empty entries?</p>
  
  <p><strong>My code:</strong></p>
  
  <p><em>index.html</em> - the page where my standard HTML forms are.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="da"&gt;
  
  &lt;html&gt;
    &lt;head&gt;
  
      &lt;title&gt;Mobiloversigten&lt;/title&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;link rel="stylesheet" href="stylesheet.css"&gt;
  
    &lt;/head&gt;
  
  &lt;body&gt;
  
      &lt;form name="formular" id="formular" method="post" action="process.php" enctype="multipart/form-data" autocomplete="on"&gt;
  
          &lt;fieldset&gt;
  
              &lt;legend&gt;Enhedsoplysninger&lt;/legend&gt;
              &lt;div&gt;&lt;label&gt;Producent: &lt;input type="text" name="manufactor" id="manufactor" required="required" size="30"&gt;&lt;/label&gt;&lt;/div&gt;
              &lt;div&gt;&lt;label&gt;Produktnavn: &lt;input type="text" name="product" id="product" required="required" size="30"&gt;&lt;/label&gt;&lt;/div&gt;
              &lt;div&gt;&lt;label&gt;Farve: &lt;input type="text" name="color" id="color" required="required" size="30"&gt;&lt;/label&gt;&lt;/div&gt;
              &lt;label&gt;Hukommelse:
                  &lt;div&gt;    
                      &lt;select size="1" name="memory" id="memory"&gt;
                          &lt;option&gt;8GB&lt;/option&gt;
                          &lt;option&gt;16GB&lt;/option&gt;
                          &lt;option&gt;32GB&lt;/option&gt;
                          &lt;option&gt;64GB&lt;/option&gt;
                          &lt;option&gt;128GB&lt;/option&gt;
                      &lt;/select&gt;
                  &lt;/div&gt;
              &lt;/label&gt;
              &lt;div&gt;&lt;label&gt;Skærmstørrelse &lt;input type="number" name="displaysize" id="displaysize" min="0" step="0.1" size="30"&gt;&lt;/label&gt;&lt;/div&gt;   
              &lt;div&gt;&lt;label&gt;Produktbillede: &lt;input type="file" name="productphoto" id="productphoto" required="required" size="30"&gt;&lt;/label&gt;&lt;/div&gt;
  
          &lt;/fieldset&gt;
  
          &lt;div&gt;&lt;input type="submit" id="ok" value="Indsend"&gt;&lt;input type="reset" id="nulstil" value="Nulstil"&gt;&lt;/div&gt;
  
      &lt;/form&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p><em>process.php</em> - the page the entries from index.html is being saved.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="da"&gt;
  
  &lt;html&gt;
  &lt;head&gt;
  
    &lt;title&gt;Mobiloversigten&lt;/title&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;link rel="stylesheet" href="stylesheet.css"&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;div class= "logo"&gt;
  
      &lt;img src="Mobilsiden.png" alt="Mobilsiden Logo" style="width:20%;height:20%;"&gt;
  
  &lt;/div&gt;
  
      &lt;div class="boks"&gt;
  
          &lt;h1&gt;Enheden er registreret&lt;/h1&gt;
  
      &lt;div class="linie"&gt;&lt;/div&gt;&lt;br&gt;
  
          &lt;div class="centerbuttons"&gt;
              &lt;a href="index.html" class="myButton"&gt;Tilføj ny enhed&lt;/a&gt;
              &lt;a href="overview.php" class="myButton"&gt;Vis enheder&lt;/a&gt;
          &lt;/div&gt;
  
  &lt;?php
  
  $manufactor = $_POST['manufactor'];
  $product = $_POST['product'];
  $color = $_POST['color'];
  $memory = $_POST['memory'];
  $displaysize = $_POST['displaysize'];
  $productphoto = $_FILES['productphoto']['name'];
  
  
  if($_FILES){
          if(strlen($_FILES['productphoto']['type'])==9)
          $name=$product . ".".$rest = substr($_FILES['productphoto']['type'], -3);
          else
          $name=$product . ".".$rest = substr($_FILES['productphoto']['type'], -4);
  
          move_uploaded_file($_FILES['productphoto']['tmp_name'], $name);
  
          }
  
  $user_data = "$manufactor, $product, $color, $memory, $displaysize, $name \r\n";
  $mobile_data = "Producent: ,Produktnavn: ,Farve: ,Hukommelse: ,Skærmstørrelse: ";
  
  $fh = fopen("data.txt", "a")   or die("Filen kunne ikke oprettes");
  fwrite($fh, $user_data)         or die("Kunne ikke skrive til filen");
  fclose($fh);
  
  $fj = fopen("mobile.txt", "w")  or die("Filen kunne ikke oprettes");
  fwrite($fj, $mobile_data)       or die("Kunne ikke skrive til filen");
  fclose($fj);
  
  ?&gt;
  
  &lt;/div&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p><em>overview.php</em> - the page the entries from the text files that were saved earlier are being showed.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="da"&gt;
  
  &lt;html&gt;
  
  &lt;head&gt;
  
      &lt;title&gt;Mobiloversigt&lt;/title&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;link rel="stylesheet" href="stylesheet.css"&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
      &lt;div class= "logo"&gt;
  
          &lt;img src="Mobilsiden.png" alt="Mobilsiden Logo" style="width:20%;height:20%;"&gt;
  
      &lt;/div&gt;
  
      &lt;div class="boks"&gt;
  
      &lt;h1&gt;Tilføjede enheder&lt;/h1&gt;
  
      &lt;div class="linie"&gt;&lt;/div&gt;&lt;br&gt;
  
      &lt;?php
  
      $info = explode(",", file_get_contents("mobile.txt"));
      $retrieved_string = file_get_contents("data.txt");
  
      $retrieved_array = explode("\n", $retrieved_string);
  
      $count=count($retrieved_array)-1;
  
      for($y = 0; $y &lt; $count; $y++){
      $user_data_array = explode(",",$retrieved_array[$y]);
      for($x = 0; $x &lt;= 4; $x++){
          echo "&lt;p&gt;$info[$x]&lt;/p&gt;&lt;p2&gt;$user_data_array[$x]&lt;/p2&gt;&lt;br&gt;";
  }       echo "&lt;img src=\"$user_data_array[5]\"&gt;&lt;br&gt;&lt;br&gt;";
          echo "&lt;div&gt;&lt;span class=\"linie\"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;";
  }
  
  
  ?&gt;        
  
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;  
  </code></pre>
  
  <p>I know that this is a very long post, but I just want to make sure, that the possible solution maker has the full overview of my code. I hope that isn't a problem. </p>
  
  <p>As I am new to PHP, I would love to have a more understandable answer, if possible :-)</p>
  
  <p>Thanks in advance!</p>