PHP session after Load ()

0

I'm having a little problem with my session ..

When I reload the page by the function load() , my session does not update and the message is displayed

Notice: Undefined variable: _SESSION

As I understand it, using load() , session data is lost.

Is there a way to solve this problem?

 $(".editoraview h1").click(function(event) {
        $.ajax({
          url: 'classes/consulta.php',
          success : function(txt){
            $('#view-full').load('classes/consulta.php');
          },
          error: function(result) {
            alert("Erro");
          }
        });
    });

Thank you = D

    
asked by anonymous 20.06.2016 / 14:57

2 answers

4

In php you need to start a new session before using session variables, for this call:

session_start();

Before using $_SESSION .

If this is not the case then edit the question by placing the php code so that we can help you.

    
20.06.2016 / 14:59
0

Just give a <?php session_start()?> on the page being loaded by load()

    
20.06.2016 / 18:28