I am trying to post an array with it but for some odd reason the only ones that fully get initialized are the third and zeroth spots.
This is the JS file im working with.
<script type="text/javascript">
jq("#runTour").click(function(e) {
//e.preventDefault();
console.log('true set');
jq.post(window.location.href + '?event=checkTour',{'initialSet[]': [12, 1, '100', window.location.origin + '/ppwweb/control.php/admin/users', window.location.href, '', true] } )
.done(function(data){
return jq(".smallipopTour1").smallipop('tour', 0, 12, 'https://devml.propertypreswizard.com/ppwweb/control.php/admin/users');/*'tour' is a keywor needed, the 0 is the current sstep we are on, 12 is the total steps in the tour, annd the address is for when the tour goes to a new page */
});
});
function continueTour1(e) {
//e.preventDefault()
return jq('.smallipopTour1').smallipop('tour', 0, 12, "https://devml.propertypreswizard.com/ppwweb/control.php/admin/users", "");
};
/* Tour stuff */
jq('.smallipopTour1').smallipop({
theme: 'white fat-shadow',
tourTitle: 'Sample',
preferredPosition: 'right',
tourHighlight: false,
popupOffset: 0,
triggerOnClick: true
});
This is the PHP code that i would be posting to.
function checkTourRun (){
//['on_tour'][0total steps, 1current step, 2steps done, 3Nurl, 4Curl, 5Burl, 6ontour]
//if(isset($_GET['requested'])) MAYBE
ob_clean();
echo '',
'<pre>';
print_r($_POST['info']);
echo '</pre>',
'';
if(isset($_POST['initialSet']))
$_SESSION['on_tour'] = $_POST['initialSet'];
//echo 'helicopter';
$pageURL .= 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
$_SESSION['on_tour'][6] = $_POST['onTourS'];
if ($_SESSION['on_tour'][6]) {
$_SESSION['masterCnt'] = $_POST['masterCntS'];//sets master count
$_SESSION['on_tour'][4] = $_POST['Curl'];//sets new Current Url
$_SESSION['on_tour'][5] = $_POST['Burl'];//sets Back Url
$_SESSION['on_tour'][2] = $_POST['stepsDone'];//sets the # of steps done
//$thing = $_SESSION['on_tour'][4];
if ($_SESSION['on_tour'][4] . "?event=checkTour" === $pageURL) {
echo false . '
';
echo $_SESSION['on_tour'][1] . '
';
echo $pageURL;
}
else if($_SESSION['on_tour'][1] === $_SESSION['on_tour'][2]){
echo true;
}
}
echo $_SESSION['on_tour'][0] . ' ';//suppose to be 12
echo $_SESSION['on_tour'][1] . ' ';//suppose to be 1
echo $_SESSION['on_tour'][4] . ' ';//suppose to be an url
//echo $pageURL;
error_log(print_r('SUPPORT', true), 0);
error_log(print_r($_SESSION, true), 0);
//echo $_SESSION['on_tour'][1][6];
exit;
}
}
My problem comes with that last few lines echoing out the 0th element and the 3rd element are the only ones that display the proper items and i do not know why. I am at my wits end and I really need help, Thanks a lot in advanced.