Yeah, I kinda tryed thing like that and number of others, but I keep getting an error;
Parse error: syntax error, unexpected T_STRING, expecting ‘)’ in functions/menus.functions.php on line 63
Anyway, heres my full code;
**<?php session_start();
[U]if[/U]($_GET[‘set’] > 0)
{
[U]if[/U]($_SESSION['whattoclose'] == NULL)
{
$_SESSION['whattoclose'] = $_GET['set'];
} [U]else[/U] {
$_SESSION['whattoclose'] = $_SESSION['whattoclose'] . '|' . $_GET['set'];
}
}
[U]if[/U]($_GET[‘undo’] > 0)
{
[U]if[/U](![U]empty[/U]($_SESSION['whattoclose'])){
$_SESSION['whattoclose'] = str_replace("|".$_GET['undo'] , "" , $_SESSION['whattoclose']);
$_SESSION['whattoclose'] = str_replace($_GET['undo'] , "" , $_SESSION['whattoclose']);
}
}
[U]function[/U] showTitle($id)
{
$title = [U]array[/U](
"Navigation",
"Login information",
);
$data = $_SESSION['whattoclose'];
$not = explode( "|" , $data );
[U]if[/U](!in_array( $id , $not ))
{
[U]echo[/U] $title[$id-1];
[U]echo[/U] '<a href="member.php?set='.$id.'"> - close**</a>**';
} [U]else[/U] {
[U]echo[/U] $title[$id-1];
[U]echo[/U] '<a href="member.php?undo='.$id.'"> - open**</a>**';
}
}
[U]function[/U] checkIt($id)
{
$data = [U]array[/U](
'**<?php
[U]echo[/U] “<p><a href='member.php?loginid=” . $_SESSION[“username”] . “’\>” . $_SESSION[“username”] . "**</a></p>";
?>
<p><a href=“member.php?change=password”>Change Password**</a></p>**
<p><a href=“member.php?change=email”>Change Email**</a></p>**
<p><a href=“member.php?change=account”>Close account**</a>****</p>**’,
'**<p>**Welcome to the members only page '.$_SESSION['username'].'!**</p>**
**<p>**You are logged in [U]as[/U] '.$_SESSION['username'].' from the IP address '.$_SERVER['REMOTE_ADDR'].'**</p>**',
);
$str = $_SESSION['whattoclose'];
$not = explode( "|" , $str );
[U]if[/U](!in_array( $id , $not ))
{
[U]echo[/U] '**<div [U]class[/U]="table">**';
[U]echo[/U] $data[$id-1];
[U]echo[/U] '**</div>**';
}
}
?>**
<div [U]class[/U]=“headerr”>
<? showTitle(1) ?>
</div>
<? checkIt(1) ?>
<br>
<div [U]class[/U]=“headerr”>
<? showTitle(2) ?>
</div>
<? checkIt(2) ?>