php-general | 2003022
Date: 02/18/03
- Next message: Kevin Waterson: "Re: [PHP] inserting <BR>"
- Previous message: Michael P. Carel: "[PHP] inserting <BR>"
- Next in thread: Rich Gray: "RE: [PHP] $_SESSIONS and printing off.."
- Reply: Rich Gray: "RE: [PHP] $_SESSIONS and printing off.."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi All,
I'm a little bit confused and it's maybe a newbie question but maybe you can help me out;
A user is login in and after username password check it will redirects to this page
<?php
session_start();
if (isset($_SESSION['username'])){
$username = $_SESSION['username'];
echo 'Welcome, you are still loged in.';
echo $username;
}
else{
header ( "Location: login.htm" );
}
?>
Question is; is this the way to print of his username?
$username = $_SESSION['username'];
Echo $username
Or has anyone some alternatives..
This is working o.k. but in my opinion it's a little bit quick and dirty?
Thanks for the comments and suggestions!
Frank
- Next message: Kevin Waterson: "Re: [PHP] inserting <BR>"
- Previous message: Michael P. Carel: "[PHP] inserting <BR>"
- Next in thread: Rich Gray: "RE: [PHP] $_SESSIONS and printing off.."
- Reply: Rich Gray: "RE: [PHP] $_SESSIONS and printing off.."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

