i'm sure i've done something like this many moons ago but i'm struggling at the moment.
my problem is thus..
if i remove the unset then it works. but if i leave it in, it's preventing the previous line from displaying. even if i use print_r($_SESSION) right after session_start(), using unset right on down the page prevents it from showing there? i'm confused...
edit: i seem to have sorted this myself by adding ob_start() directly after session_start(). this is more luck than judgement though. i have no idea what i'm doing.
edit2: what little luck i had seems to have run out. without making any changes, it's not working anymore. :/
my problem is thus..
Code:
<?php
session_start();
?>
//html gibberish + form
<?php
if(isset($_SESSION('message'])) {
echo $_SESSION['message'];
unset($_SESSION['message']);
}
?>
//html stuff to finish
if i remove the unset then it works. but if i leave it in, it's preventing the previous line from displaying. even if i use print_r($_SESSION) right after session_start(), using unset right on down the page prevents it from showing there? i'm confused...
edit: i seem to have sorted this myself by adding ob_start() directly after session_start(). this is more luck than judgement though. i have no idea what i'm doing.
edit2: what little luck i had seems to have run out. without making any changes, it's not working anymore. :/
Last edited: