Jump to content
Fórum Script Brasil
  • 0
Sign in to follow this  
Guest darlan

Sessao

Question

Guest darlan

como utilizo a sessao utilizei uma vez e deu certo so q agora não to conseguindo acessar o q gravei na sessao ex

crio a sessao na pagina index

session _start()

session_name(a)

$aluno=2;

sessin_register(aluno)

e quando vou chamar na outra pagina

session _start()

session_name(a)

echo" $aluno";

so q não retorna nada me ajude me mostre o correto como crio e como chamo em outra pagina

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

tenta echo "$_SESSION[aluno]";

Share this post


Link to post
Share on other sites
  • 0

session _start()
session_name(a)
$aluno=2;
sessin_register(aluno)

Que tal session_register(aluno) ou $_SESSION["aluno"]=2 (isso dependerá da versão de seu PHP)?

;)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  



  • Forum Statistics

    • Total Topics
      148486
    • Total Posts
      644140
×
×
  • Create New...