title: ERROR: localhost redirected you too many times
body: <p>Hi I'm a new student and starting to learn coding/programming specially on PHP. I tried learning some code and I have encountered this problem.</p>
  
  <p><strong>This page isn’t working</strong></p>
  
  <p><em>localhost redirected you too many times.</em>
  Try clearing your cookies.
  <strong>ERR_TOO_MANY_REDIRECTS</strong></p>
  
  <p>and this is my code:</p>
  
  <pre><code>session_start();
  
  include('_includes/config.php');
  include('_includes/db.php');
  
      if(isset($_POST['register'])){
          $_SESSION['uname'] = $_POST['uname'];
          $_SESSION['fname'] = $_POST['fname'];
          $_SESSION['lname'] = $_POST['lname'];
          $_SESSION['email'] = $_POST['email'];
          $_SESSION['address'] = $_POST['address'];
          $_SESSION['postal'] = $_POST['postal'];
          $_SESSION['pass'] = $_POST['pass'];
          $_SESSION['con-pass'] = $_POST['con-pass'];
      }
  
      if(strlen($_POST['uname'])&lt;3){
          header("Location:register.php?err=" . urlencode("The username must be at least 3 characters long"));
          die();
      }
  </code></pre>
  
  <p>I really don't know what to do I have encountered some errors in php but I haven't encountered this kind of error PLEASE HELP and PLEASE ENLIGHTEN me on what I have done wrong.</p>