Do not log in a web upload to a hositng


I uploaded my website to a hosting, in fact I had already tested it successfully. The problem is that the login is reloaded and does not enter the cover:

<html xmlns="">
    <title>GESTION OTTRA</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="css/stylos.css"/>
      <meta charset="utf-8" />
        <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" />
        <link rel="stylesheet" href="bootstrap/css/bootstrap.css" />
        <link rel="stylesheet" href="bootstrap/css/bootstrap-theme.min.css" />
        <link rel="stylesheet" href="bootstrap/css/bootstrap-theme.css" />
        <link rel="stylesheet" href="bootstrap/css/bootstrap-theme.css" />
        <link rel="stylesheet" href="css/stylos.css" />
        <script src="includes/jquery-3.3.1.js"></script>
<script src="bootstrap/js/bootstrap.js"></script>


<?php session_start(); ?>

        <script type="text/javascript" src="views/login.js"></script>

     include_once ($_SERVER['DOCUMENT_ROOT'].'/routes.php');
if ( isset($_SESSION['username']) && isset($_SESSION['userid']) ){

 include_once ($_SERVER['DOCUMENT_ROOT'].'/views/template.php');
    if (isset($_GET['controller'])&&isset($_GET['action'])) {

        if (isset($_GET['id'])){
        call($controller,$action,0); }

        echo "nn";    } 

    echo '<div class="contenedor">
<div class="cabecera">
<div class="cuerpo">
<div class="panel panel-primary" style="width:50%">
<div class="panel-heading">INGRESE AL SISTEMA</div>
<div class="row">
<div class="col-sm-4">
<label style="color: blue">Usuario:</label></div><div class="col-sm-4">
                <input type="text" style="color:blue" name="login_username" id="login_username" /></div>
          </div><div class="row"><div class="col-sm-4">
                <label style="color: blue">Contraseña:</label></div><div class="col-sm-4">
             <input type="password" name="login_userpass" id="login_userpass" style="color:blue" />
         <div class="row"><div class="col-sm-4">
             <span class="timer" id="timer"></span><button id="login_userbttn" class="btn btn-primary">Login</button></div>
              </div>   </div>

In the login process file doing a var_dump the session is created perfectly. It is more I have a method that registers the session in the database with date and time and other and the registers are seen every time I log in a new one appears.

But as you can see above, the session does not arrive, I've already done var_dump ($ _ SESSION) and it gives null. But what can it be?

include_once ($_SERVER['DOCUMENT_ROOT'].'/models/claseLogin.php');  

    $U1=new Login();
         if (count($arrayu)>0){ 
                foreach ($arrayu as $n){

             foreach ($id as $i){
                }echo 1;
                    echo 0;}

asked by Caruso 16.12.2018 в 12:28

0 answers