Quantcast
Channel: WHMCS Community Forums
Viewing all articles
Browse latest Browse all 13458

Share WHMCS SESSION with Non-WHMCS pages

$
0
0
Hello,

I'm setting a SESSION in my HTML page that doesn't gets pulled by WHMCS:

HTML
header.php
Code:

                                        <script>
                                        $(document).ready(function() {
                                                $(".comprarnaologado").click(function(){
                                                        var pid = $(this).data('pid');
                                                        $.post("/redirecttoproduct.php", {"pidofproduct": pid});
                                                });
                                        });
                                        </script>

redirecttoproduct.php
Code:

<?php
    if(!session_id()) session_start();
    $_SESSION['redirectproductpid'] = $_POST['pidofproduct'];
?>

It echoes:
Code:

print_r($_SESSION); = Array ( [tkval] => 48jEK8Xm7f5m [redirectproductpid] => 14 )
But on WHMCS, the $_SESSION doesn't contain redirectproductpid
Code:

print_r($_SESSION); Array ( [tkval] => c7Brzy1qww6o [calinkupdatecc] => 0 [calinkupdatesq] => 0 [cart] => Array ( [user] => Array ( [country] => BR ) ) [Language] => brasil [uid] => 27 [upw] => 60dafaa05bca2fdc335640beb8202199fde50f30 )
I think it's starting a new SESSION, how can I make WHMCS pages and non-WHMCS pages share the same SESSION?
Thanks!

Viewing all articles
Browse latest Browse all 13458

Trending Articles