php registered user only help

PBRgearbox

Beta member
Messages
3
So i am trying to use this

<code>
<?php
if($_SESSION['id'])
echo '<h1>Hello, '.$_SESSION['usr'].'! You are registered and logged in!</h1>';
else echo '<h1>Please, <a href="demo.php">login</a> and come back later!</h1>';
echo 'Should i find a new login'
?>
<code>
to make
 
Help

:confused:Hi do any of you know a script for a horizontal drop down menu for java not java script.

Big Thanks
 
Please dont ask a question in a thread that has a completely unconnected question in it. make your own thread after searching the web.
 
for the OP.

investigate the possibilities of using ob_start(); and session_start(); at the top of your script.
this will enable you to put some session information into the headers to keep sessions on the browser, if you've already sent any content to the browser then you can't edit the headers later.

PHP manual pages have quite a few examples on using these functions.
 
<code>
<?php
session_start();

if isset(!$_SESSION['id'])
{echo 'not logged in';}
else
echo 'logged in and registered';
?>
<code>
 
Back
Top Bottom