title: Updating user information
body: <p>I know I can't use two session start codes in a same php page but for the sake of updating user account, I need the below code and I need to use session_start twice. One, to check if the user is not logged in, then redirect them and banned them from seeing the update info page and also the other session start has to be there so that my session variables could be set automatically in the update info page if the user is logged in. </p>
  
  <p>anyways, I am getting this error can you guys please show me a work around way? if there's any?</p>
  
  <p>thanks. 
  Notice: A session had already been started - ignoring session_start() in ....</p>
  
  <pre><code>&lt;?php session_start();      
  if(isset($_SESSION['userid'])) { 
      } else {
          header('Location: login.php');
      } 
  ?&gt;
  &lt;?php
  
      $user = $_SESSION['userid'];
      $myquery = "SELECT * FROM our_users WHERE `userid`='$user'";
      $result = mysqli_query($conn, $thequery);
      $row = mysqli_fetch_array($result, MYSQLI_BOTH);
      session_start();    /* Basically this right here gets ignored. */
      $_SESSION["user_first_name"] = $row['fn'];
      $_SESSION["user_last_name"] = $row['ln'];
      $_SESSION["user_email"] = $row['em'];
      $_SESSION["user_password"] = $row['pw'];     
  ?&gt;
  </code></pre>