I am trying to create a session variable for use in an iframe page.
I thought this would work but I was wrong, can anyone help please?
The following code is in a non wordpress page.
<?php
session_start();
include '../wp-config.php';
?>
<?php
$_SESSION['UserID'];
get_currentuserinfo();
echo $_SESSION['UserID']->ID;
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="500">
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="20">
<tr bgcolor="#D0C1F7" >
<td width="13%"></td>
<td width="78%" class="sitename">Cycling routes supplied by </td>
<td width="9%" align="right" valign="bottom">
<?php if($_SESSION['UserID']!=NULL){?>
<a href="home.php">Home</a>| |<a href="logout.php">Logout</a>
<?php } ?></td>
</tr>
</table>
<?php echo $_SESSION['UserID'];?>