I’m trying to creat two consecutive pages, where you have to go to the first page to have access to the second page. I’m doing this in WordPress and trying to add PHP code snippets to make this work. I have it working but only every other time. If you go to this link //www.lytrod.com/intellicut-install-demo. it will only redirect every other time
I set the variable on page 1
<?php session_start(); $_SESSION[ 'display_page2' ] = TRUE; ?>Page:2
<?php
session_start();
if ((isset($_SESSION['display_page2']) && $_SESSION['display_page2'] === true) || isset($_POST['nf-field-184'])) {
//run page two
} else {
header('Location:http://www.lytrod.com/intellicutinstallation-2/');
}
// clears the variable
unset($_SESSION['display_page2']);