title: PHP Header('Location: XYZ'); to locate to a div
body: <p>going to keep this short!
  So I've got a login/registration page and when a user registers to the site I want them to be shown the login page. Please note it's ONE page with the login and registration side by side, and when one is clicked it's shown whilst the other one is hidden.</p>
  
  <p>Here is the page -index:
  <a href="http://prntscr.com/ci48ee" rel="nofollow">http://prntscr.com/ci48ee</a> - What it looks like upon loading.
  Here is the page -index upon clicking the login bit:
  <a href="http://prntscr.com/ci48jh" rel="nofollow">http://prntscr.com/ci48jh</a></p>
  
  <p>index code:</p>
  
  <pre><code>&lt;?php
  include 'dbh.php';
  if(isset($_POST['rsubmit'])){
  $username = $_POST['username'];
  $email = $_POST['email'];
  $plainpass = $_POST['password'];
  $password = password_hash($plainpass, PASSWORD_BCRYPT, array('cost' =&gt; 10));
  $sql = "INSERT INTO users (username, email, password) VALUES ('$username', '$email', '$password')";
  $result = mysqli_query($conn, $sql);
  header('Location: #login');
  }else {}
  ?&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html &gt;
    &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Mr. Liam&lt;/title&gt;
      &lt;link href='http://fonts.googleapis.com/css?family=Titillium+Web:400,300,600' rel='stylesheet' type='text/css'&gt;
      &lt;link rel="stylesheet" href="css/normalize.css"&gt;
          &lt;link rel="stylesheet" href="css/style.css"&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div class="form"&gt; 
        &lt;ul class="tab-group"&gt;
          &lt;li class="tab active"&gt;&lt;a href="#signup"&gt;Sign Up&lt;/a&gt;&lt;/li&gt;
          &lt;li class="tab"&gt;&lt;a href="#login"&gt;Log In&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;     
        &lt;div class="tab-content"&gt;
          &lt;div id="signup"&gt;   
            &lt;h1&gt;Sign Up to view content&lt;/h1&gt;          
            &lt;form action="index.php" method="post"&gt;          
            &lt;div class="field-wrap"&gt;
              &lt;label&gt;
                Username&lt;span class="req"&gt;*&lt;/span&gt;
              &lt;/label&gt;
              &lt;input name="username" type="text"required/&gt;
            &lt;/div&gt; 
            &lt;div class="field-wrap"&gt;
              &lt;label&gt;
                Email Address&lt;span class="req"&gt;*&lt;/span&gt;
              &lt;/label&gt;
              &lt;input name="email" type="email"required autocomplete="off"/&gt;
            &lt;/div&gt;          
            &lt;div class="field-wrap"&gt;
              &lt;label&gt;
                Set A Password&lt;span class="req"&gt;*&lt;/span&gt;
              &lt;/label&gt;
              &lt;input name="password" type="password"required autocomplete="off"/&gt;
            &lt;/div&gt;         
            &lt;button name="rsubmit" type="submit" class="button button-block"/&gt;Register&lt;/button&gt;         
            &lt;/form&gt;
          &lt;/div&gt;        
          &lt;div id="login"&gt;   
            &lt;h1&gt;Welcome Back!&lt;/h1&gt;         
            &lt;form action="/" method="post"&gt;          
              &lt;div class="field-wrap"&gt;
              &lt;label&gt;
                Email Address&lt;span class="req"&gt;*&lt;/span&gt;
              &lt;/label&gt;
              &lt;input type="email"required autocomplete="off"/&gt;
            &lt;/div&gt;          
            &lt;div class="field-wrap"&gt;
              &lt;label&gt;
                Password&lt;span class="req"&gt;*&lt;/span&gt;
              &lt;/label&gt;
              &lt;input type="password"required autocomplete="off"/&gt;
            &lt;/div&gt;         
            &lt;p class="forgot"&gt;&lt;a href="#"&gt;Forgot Password?&lt;/a&gt;&lt;/p&gt;          
            &lt;button class="button button-block"/&gt;Log In&lt;/button&gt;          
            &lt;/form&gt;
          &lt;/div&gt;        
        &lt;/div&gt;&lt;!-- tab-content --&gt;      
  &lt;/div&gt; &lt;!-- /form --&gt;
      &lt;script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'&gt;&lt;/script&gt;
          &lt;script src="js/index.js"&gt;&lt;/script&gt;  
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I'm guessing it's something along the lines of this??</p>
  
  <pre><code>Header('Location: #login');
  </code></pre>
  
  <p>But when I tried that it doesn't work. If you need any more info let me know!</p>