title: php login works on desktop not mobile
body: <p>On desktop you can sign in and it will take you to your account details with everything listed correctly. 
  On mobile it will say you logged in successfully but it'll take you to the account page as if it were a welcome guest page. 
  it worked on mobile when I uploaded it then suddenly stopped working.   </p>
  
  <p>login.php</p>
  
  <pre><code>&lt;?php
  include("includes/db.php");
  
  ?&gt;
  
      &lt;div&gt;
  
      &lt;form class="form-signin" method="post" action=""&gt;
  
      &lt;h4 class="form-signin-heading"&gt;Login&lt;/h4&gt;
  
      &lt;input type="text" name="email" class="form-control" placeholder="Email address" required&gt;
      &lt;div class="checkbox"&gt; &lt;/div&gt;
  
      &lt;input type="password" name="pass" class="form-control" placeholder="Password" required&gt;
      &lt;div class="checkbox"&gt; &lt;/div&gt;
      &lt;button class="btn btn-lg btn-primary btn-block" type="submit" name="login" value="Login"&gt;Sign in&lt;/button&gt;
      &lt;br&gt;&lt;p class="text-center"&gt;&lt;a href="checkout.php?forgot_pass" class="forgotlink"&gt;Forgot Password?&lt;/a&gt;&lt;/p&gt;
  
      &lt;/form&gt;
      &lt;br&gt;&lt;p class="text-right"&gt;&lt;a href="customer_register.php" class="forgotlink"&gt;New? Register!&lt;/a&gt;&lt;/p&gt;
  
  
  
      &lt;?php 
      if(isset($_POST['login'])){
  
      $c_email = $_POST['email'];
      $c_pass = $_POST['pass'];
  
      $sel_c = "select * from customers where customer_pass='$c_pass' AND customer_email='$c_email'";
  
      $run_c = mysqli_query($con, $sel_c);
  
      $check_customer = mysqli_num_rows($run_c); 
  
      if($check_customer==0){
  
      echo "&lt;script&gt;alert('Password or email is incorrect')&lt;/script&gt;";
      exit();
      }
      $ip = getIp(); 
  
      $sel_cart = "select * from cart where ip_add='$ip'";
  
      $run_cart = mysqli_query($con, $sel_cart); 
  
      $check_cart = mysqli_num_rows($run_cart); 
  
      if($check_customer&gt;0 AND $check_cart==0){
  
      $_SESSION['customer_email']=$c_email; 
  
      echo "&lt;script&gt;alert('You logged in successfully')&lt;/script&gt;";
      echo "&lt;script&gt;window.open('customer/my_account.php','_self')&lt;/script&gt;";
  
      }
      else {
      $_SESSION['customer_email']=$c_email; 
  
      echo "&lt;script&gt;alert('You logged in successfully')&lt;/script&gt;";
      echo "&lt;script&gt;window.open('checkout.php','_self')&lt;/script&gt;";
  
  
              }
      }
  
  
      ?&gt;
  
  
      &lt;/div&gt;   
  </code></pre>
  
  <p>Then it redirects to your account details</p>
  
  <pre><code>&lt;?php 
  session_start();
  include("functions/functions.php");
  
  ?&gt;
  
  &lt;!DOCTYPE html&gt;
  
  &lt;head&gt;
  
  &lt;meta charset="utf-8"&gt;
  &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  &lt;meta name="description" content=""&gt;
  &lt;meta name="author" content=""&gt;
  
  &lt;title&gt;Deals&lt;/title&gt;
  
  &lt;link href="../styles/bootstrap.min.css" rel="stylesheet"&gt;
  &lt;link href="../styles/bootstrap.css" rel="stylesheet"&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;div class="container"&gt;
  
  &lt;div class="row"&gt;
  
  &lt;div class="col-md-12"&gt;
  
  
  
  &lt;?php include("../includes/header.html"); ?&gt;
  
  &lt;nav class="navbar navbar-inverse navbar" role="navigation"&gt;
  &lt;div class="container-fluid"&gt;
  
  &lt;?php cart(); ?&gt;
  
  &lt;div&gt;
  &lt;ul class="navbar-nav navbar-right navbar-small list-inline"&gt;
  
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/nav&gt;
  &lt;/div&gt;
  
  &lt;div class="col-md-4"&gt;
  
  &lt;div class="well"&gt;
  &lt;h4&gt;My Account&lt;/h4&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-md-12"&gt;
  &lt;button class='btn btn-large btn-block btn-nav' type='button'&gt;&lt;a href='my_account.php?my_orders'&gt;My Orders&lt;/a&gt;&lt;/button&gt;
  &lt;button class='btn btn-large btn-block btn-nav' type='button'&gt;&lt;a href='my_account.php?edit_account'&gt;Edit Account&lt;/a&gt;&lt;/button&gt;
  &lt;button class='btn btn-large btn-block btn-nav' type='button'&gt;&lt;a href='my_account.php?change_pass'&gt;Change Password&lt;/a&gt;&lt;/button&gt;
  &lt;button class='btn btn-large btn-block btn-nav' type='button'&gt;&lt;a href='my_account.php?delete_account'&gt;Delete Account&lt;/a&gt;&lt;/button&gt;
  
  &lt;/div&gt;
      &lt;/div&gt;
          &lt;/div&gt;
  
  &lt;div class="well"&gt;
      &lt;div class="text-center"&gt;&lt;i class='glyphicon glyphicon-user'&gt;&lt;/i&gt;
      &lt;?php 
          if(isset($_SESSION['customer_email'])){
          echo  $_SESSION['customer_email'];
          }
          else {
          echo "&lt;p&gt;&lt;b&gt;Welcome Guest:&lt;/b&gt;&lt;/p&gt;";
          }
          ?&gt;
  
  &lt;/div&gt;
              &lt;?php 
              $user = $_SESSION['customer_email'];
  
              $get_img = "select * from customers where customer_email='$user'";
  
              $run_img = mysqli_query($con, $get_img); 
  
              $row_img = mysqli_fetch_array($run_img); 
  
              $c_image = $row_img['customer_image'];
  
              $c_name = $row_img['customer_name'];
  
  
              echo "&lt;div&gt;&lt;br&gt;&lt;img src='customer_images/$c_image' class='img-circle img-responsive center-block'&gt;&lt;/div&gt;";
  
              ?&gt;
  
  
              &lt;?php 
              if(!isset($_SESSION['customer_email'])){
  
              echo "&lt;a href='../checkout.php' class='forgotlink'&gt;Login&lt;/a&gt;";
  
              }
              else {
              echo "&lt;p&gt;&lt;br&gt;&lt;a href='../logout.php' class='btn btn-lg btn-danger btn-block' role='button'&gt;Logout&lt;/a&gt;&lt;/p&gt;";
              }
  
  
  
              ?&gt;
  
  
              &lt;/div&gt;
  
              &lt;div class="well"&gt;
                  &lt;h4&gt;My Account&lt;/h4&gt;
                  &lt;p&gt;Here you're able to view your orders, Edit your account, Change your Password, and sadly Delete your Account.&lt;/p&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="col-md-8"&gt;
              &lt;div class="well"&gt;
  
                  &lt;?php 
              if(!isset($_GET['my_orders'])){
                  if(!isset($_GET['edit_account'])){
                      if(!isset($_GET['change_pass'])){
                          if(!isset($_GET['delete_account'])){
  
              echo "
              &lt;h2 style='padding:20px;'&gt;&lt;i class='glyphicon glyphicon-user'&gt;&lt;/i&gt; Welcome  $c_name &lt;/h2&gt;  
              &lt;b&gt;You can see your orders progress by clicking this &lt;a href='my_account.php?my_orders' class='forgotlink'&gt;link&lt;/a&gt;&lt;/b&gt;";
              }
              }
              }
              }
              ?&gt;
  
              &lt;?php 
              if(isset($_GET['edit_account'])){
              include("edit_account.php");
              }
              if(isset($_GET['change_pass'])){
              include("change_pass.php");
              }
              if(isset($_GET['delete_account'])){
              include("delete_account.php");
              }
  
  
              ?&gt;
  
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;hr&gt;
  
  &lt;footer&gt;
  &lt;div class="row"&gt;
      &lt;div class="col-lg-12"&gt;
          &lt;p&gt;Copyright &amp;copy; Deals&lt;/p&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/footer&gt;
  
  &lt;/div&gt;
  &lt;script src="../js/jquery.js"&gt;&lt;/script&gt;
  &lt;script src="../js/bootstrap.min.js"&gt;&lt;/script&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>