Thread: Basic Sessions?
View Single Post
  #1 (permalink)  
Old 04-21-2008, 12:31 PM
phpforfun's Avatar   
phpforfun phpforfun is offline
Programming God
 
Join Date: Feb 2008
Posts: 969
Last Blog:
Programming "Just a ...
Credits: 1
Rep Power: 11
phpforfun has a spectacular aura aboutphpforfun has a spectacular aura about
Default Basic Sessions?

Pretty basic, but for some reason im stuck. I cant get sessions to run.. I dont think. Or maybe I have a problem getting the set information.

Look at this..

http://analyzethathost.com/session.php

the EXACT code for that is this.

PHP Code:
<?
session_start
();
$username $_SESSION['username'];
if(isset(
$username)){
    Echo 
$username;
} Else {
    if(isset(
$_GET['do'])){
         
session_register("username"JohnDoe);
        Echo 
'session started! <a href="?">Click here to go home and view the name your session was started with</a>';
    } Else {
        Echo 
'<a href="?do=yes">click here to start session</a>';
    }
}
?>
I was told that is the correct code, and its the code I pretty much cut and pasted from the other music site I had a while back..

any ideas? Does it work for you guys?
Reply With Quote

Sponsored Links