manton Posted April 28, 2007 Share Posted April 28, 2007 Hello I have a problem with sessions. Please, check what is wrong with my code page1 is a form page2 PHP Code: session_start(); $_SESSION['ses_kod'] = $_POST['txtkod']; It works up to here, I get the data but when loading the page itself (a link that points to the page itself) data is lost. Then I have a page 3 PHP Code: <?php session_start(); ?> Here is the problem, I cannot retreive any data. Thanks Link to comment https://forums.phpfreaks.com/topic/49111-session-coding-question/ Share on other sites More sharing options...
benjaminbeazy Posted April 28, 2007 Share Posted April 28, 2007 on page 2 try something like this.. if(isset($_POST['VAR_NAME'])){ $_SESSION['VAR_NAME'] = $_POST['VAR_NAME']; } Link to comment https://forums.phpfreaks.com/topic/49111-session-coding-question/#findComment-240624 Share on other sites More sharing options...
manton Posted April 28, 2007 Author Share Posted April 28, 2007 no, its not working... Link to comment https://forums.phpfreaks.com/topic/49111-session-coding-question/#findComment-240630 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.