session error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
de_oracle
Forum Newbie
Posts: 1
Joined: Tue Mar 13, 2007 8:41 pm

session error

Post by de_oracle »

The Ninja Space Goat | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Im a new programmer for php. when I programming with session I got errors. Here the question. I make small code to gte seeeion id. but when I reload the page it appear different id at diffrerent times. This is my code

Code: Select all

<?php
 session_start();
 echo "<p>Your session ID is ".session_id().".</p>";
?>
But I have heard about that session id cannot change when reload the page. How can I solve this.

Thanks
de_oracle


The Ninja Space Goat | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Have you searched the web, here, or the skies for the bulk of the error?
Post Reply