hi php gurus i have a problem in php session. my client has a website where he can manage the questions answer. user will buy courses and get exam. in that site a php forum is integrated. my client wants that the forum will be only visible when a user get register. i have put that forum link in the session. so when a user get register he will access the forum link. but the problem is that when a user get direct access to the forum he can manage able to get in to forum. i want if new user get direct access to the forum he will redirect to the index page of the site. forum is placed in another folder. pls help me thanks in advance
Please show us some code, does your script start with session_start()? More details wil help you alot!
Each script have its own session handler coded in PHP I suppose. So each starting its own session (different session ID) so this the reason you can't transport the variable from one script to another. Solution is to modify the forum script session handler.