Jump to content

session error


de_oracle

Recommended Posts

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

 

<?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

Link to comment
https://forums.phpfreaks.com/topic/42606-session-error/
Share on other sites

http://us2.php.net/manual/en/function.session-id.php

 

Use the session_id($SID) to set the session

 

Other than that I am not sure, I never came across that problem. But I also have my php configured not to append the session id onto urls, maybe that has something to do with it.

 

--FrosT

Link to comment
https://forums.phpfreaks.com/topic/42606-session-error/#findComment-207312
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.