jQuery AJAX and PHP session issue -


really hope makes sense , can point me in right direction. on registration page (parent page), when enter license code jquery ajax success function loads content page appended url include session id:

success: function(data) {     if (data=="registererror") {         $("#error").show();         $("#processing").hide();     } else {         $("#contain").load("download-software.php?sessionid=xxxx #req");         }     } 

the page "download-software" has following php referrer check make sure content being requested registration page via session id , redirects if it's not:

<?php $code = $_get['sessionid']; if(strcmp( $code , 'xxxx'  ) != 0) {     header("location: http://www.someotherpage.com"); } ?> 

that works fine. need in "download-software #req" content loaded parent page, have link when clicked replaces "download-software #req" content has been loaded inside parent page content page , same type of session id check.

i cannot work. place following code on "download-software #req" content <a id="beta">beta notes $("#beta").click(function() { $("#req").load("nt7-sp1-download.php #betanotes"); });`

i've tried using .live function. how start new session , make work? *answer** used live function on parent page , works fine. making hard guess.

i refrain using query string parameters , use included php session functions.

use:

<?php  // initialize session  session_start();  // assignment call $_session['key'] = 'value';  ?> 

you can retrieve data session on same server in subsequent page requests.

when done session, use: session_destroy()


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -