I have a small form that I made with CoffeeCup form builder. It loads inside of an Iframe in the page. The problem is that it expires my PHP session when ever it loads. I went to the file that is being loaded into the iframe and put session_start(); at the top, but whenever I navigate to that page the session becomes destroyed.
If you're not familiar with coffee cup, here is the code that is loaded into the Iframe.
<?php
session_start();
$scriptpath = substr( $_SERVER['SCRIPT_FILENAME'], 0, -4 );
$paths = explode ( DIRECTORY_SEPARATOR , $scriptpath );
$myName = end($paths);
require $scriptpath . '/fbapp/php/config.inc.php';
if( strtoupper( $_SERVER['REQUEST_METHOD'] ) == 'POST' ) {
$ctl = new FormController();
$ctl->Dispatch();
} else {
if( ! isset( $_GET['action'] ) ) $myPage->ReportStats( 'NotifyFormView' );
}
ob_start();
$myPage->Show();
ob_end_flush();
?>
<script type="text/javascript">document.write(unescape("%3Ciframe id=\"fb_iframe\" src=\"redeem.php" + window.location.search + "\" width=\"100%\" height=\"379\"allowtransparency=\"true\" scrolling=\"no\" frameborder=\"0\"%3E<a href=\"redeem.php\" title=\"redeem\">Check out my CoffeeCup Form</a>%3C/iframe%3E"));</script>
Any help is appreciated.
Thanks, - ImNotLoved