jquery - Can I update session via Ajax and after PHP read this session? -


In my "estabelecimento.php" I send data to "carrinho.php" via Ajax and in one session Is stored. I want to use the session created on "carrinho.php" while refreshing the browser.

estabelecimento.php

  & lt ;? Php session_start (); If (project ($ _ session ['prato'])) {echo 'session'; } Else {echo'session not found '; }? & Gt; & Lt; Script & gt; $ .ajax ({url: "carrinho.php", type: 'post', data: {idPrato: idPrato, quantidade: quantidade, detalhes: detalhes, acao: acao}}); & Lt; / Script & gt;   

Carrinho.FP

     

add session_start (); After opening estabelecimento.php in tag.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -