I am having a problem where my session variable is not being set (Session variables only sets once the page has been refreshed) and I think the reason is that the page is loading before the PHP code has finished running. Resulting in the question: Can session variables be set/created after the page has loaded?
Asked
Active
Viewed 902 times
0
-
Do you have `session_start();` in the top of your document? Forgetting about session_start is surely the most common mistake in this topic. Show us some code... it's impossible to know what's going on unless you give us more info. – faerin Jan 22 '15 at 19:39
-
session_start() will fix it – Dimitri Jan 22 '15 at 19:39
-
yep I have session start, please read the comments on the post linked as I have not attained an answer/solution yet. – Alex Wetton Jan 22 '15 at 19:40
1 Answers
1
The answer to the question is a resounding
YES

AbraCadaver
- 78,200
- 7
- 66
- 87
-
LOL!! good answer. Not my DV though ;-) you've got some brass lol – Funk Forty Niner Jan 22 '15 at 19:41
-
-
Ahhh Mr. Johnny Cash himself ;-) I saw him twice :-)) God bless his country western soul. – Funk Forty Niner Jan 22 '15 at 19:42