Lost Password?


Go Back   CodeCall Programming Forum > Web Development Forum > PHP Forum

PHP Forum Use this forum to discuss all aspects of PHP Development. PHP is a server-side, cross-platform, HTML embedded scripting language that lets you create dynamic web pages.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-21-2008, 12:31 PM
phpforfun's Avatar   
phpforfun phpforfun is offline
Programming God
 
Join Date: Feb 2008
Posts: 886
Last Blog:
Programming "Just a ...
Rep Power: 9
phpforfun will become famous soon enoughphpforfun will become famous soon enough
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 04-21-2008, 01:20 PM
John's Avatar   
John John is offline
Co-Administrator
 
Join Date: Jul 2006
Age: 20
Posts: 3,433
Last Blog:
Google Web Toolkit
Rep Power: 20
John has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond repute
Send a message via AIM to John Send a message via MSN to John
Default Re: Basic Sessions?

PHP: session_register - Manual
Quote:
If you want your script to work regardless of register_globals, you need to instead use the $_SESSION array as $_SESSION entries are automatically registered. If your script uses session_register(), it will not work in environments where the PHP directive register_globals is disabled.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Contest: C# vs. Java vs. Visual Basic Jordan General Programming 259 11-10-2008 03:53 PM
Conversion of function from C to Basic badkarma General Programming 1 02-27-2008 03:39 PM
HTML Basic Formatting clookid Tutorials 14 03-06-2007 04:10 PM
Graphical programming add-in for Visual Basic 6.0 xXHalfSliceXx Visual Basic Programming 10 01-03-2007 08:14 AM
Parallel Port Programming Using Visual Basic kevintcp85 Visual Basic Programming 12 12-06-2006 01:09 PM


All times are GMT -5. The time now is 06:57 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 97%

Ads