kannu Posted March 27, 2009 Share Posted March 27, 2009 hey guys, i initialized a session variable in the following manner :- <?php $_SESSION['test12'] = "<td><span id=\"custom_carat\">".$row_prod['total_carat_weight']."</span><span id=\"center_diamond1\">".$default_diamond['shape']."</span>"</td>"; echo $_SESSION['test12']; ?> This works well, and the Session "Test12" is initialized. Based on the user selection the above script is then called many times, each time the session value is updated, as I have the echo statement to check it However, when I access the session variable from the next page by using the echo statement, only the first initalized value is given and not the further changed value as there might be. Can you tell me please if there is something that I am missing in this. thanks Link to comment https://forums.phpfreaks.com/topic/151391-session-variable-not-being-updated/ Share on other sites More sharing options...
kenrbnsn Posted March 27, 2009 Share Posted March 27, 2009 You must have <?php session_start(); ?> at the start of every script where you use sessions. Ken Link to comment https://forums.phpfreaks.com/topic/151391-session-variable-not-being-updated/#findComment-795157 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.