php - Automatically update $_SESSION variables without refreshing -


i using $_session variable send emails via ajax (they need sent without refreshing page), $_session variable doesn't automatically update, when changes need refresh page update variable.

is possible update $_session variable without refreshing?

this code i'm using send email:

$(document).ready(function(){     $("#medicalembassy").validate({         debug: false,         rules: {             name: "required",             email: {                 required: true,                 email: true             }         },         messages: {             name: "please let know are.",             email: "",         },         submithandler: function(form) {             // other stuff valid form             $.post('http://www.example.co.uk/erc/process.php?imei=<?php echo $_session['imei2']; ?>&send_type=2', $("#medicalembassy").serialize(), function(data) {                 $('#results').html(data);             });         }     }); }); 

so basically, if $_session variable changes, need ajax email recognise without having refresh.

thanks help

a $_session variable obtained when run "session_start();" , cleared if use "session_destroy();". cannot change in session variables multiple times in same document, however: document ajax requesting see changes in $_session each time page requested (the page inside ajax).


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -