Hello,
I'm setting a SESSION in my HTML page that doesn't gets pulled by WHMCS:
HTML
header.php
redirecttoproduct.php
It echoes:
But on WHMCS, the $_SESSION doesn't contain redirectproductpid
I think it's starting a new SESSION, how can I make WHMCS pages and non-WHMCS pages share the same SESSION?
Thanks!
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>
Code:
<?php
if(!session_id()) session_start();
$_SESSION['redirectproductpid'] = $_POST['pidofproduct'];
?>
Code:
print_r($_SESSION); = Array ( [tkval] => 48jEK8Xm7f5m [redirectproductpid] => 14 )
Code:
print_r($_SESSION); Array ( [tkval] => c7Brzy1qww6o [calinkupdatecc] => 0 [calinkupdatesq] => 0 [cart] => Array ( [user] => Array ( [country] => BR ) ) [Language] => brasil [uid] => 27 [upw] => 60dafaa05bca2fdc335640beb8202199fde50f30 )
Thanks!