September 26, 200917 yr Ok so i was wondering are you only allowed to check if a session exist only one time on each page of your site so say if i check if $_SESSION['uid'] exist at the top of the page for something then check if it exist again at the bottom of the page for something else is this considered bad practice thanks
September 27, 200917 yr Ok so i was wondering are you only allowed to check if a session exist only one time on each page of your site so say if i check if $_SESSION['uid'] exist at the top of the page for something then check if it exist again at the bottom of the page for something else is this considered bad practice thanks Why would you need to check if a $_SESSION variable exists at the top and at the bottom of a page? If you're on the same page, it exists... Can you explain what you're trying to achieve? BenTheDesigner
September 27, 200917 yr Author Why would you need to check if a $_SESSION variable exists at the top and at the bottom of a page? If you're on the same page, it exists... Can you explain what you're trying to achieve? BenTheDesigner Yea say you have a login form at the top well here i'll do the code to show you what i mean if($_SESSION['uid']){ #login form } Ok so you wrap the login form into that if statement but then you wanna check the same session at the bottom of the page but thats at the top so could you use another if statement to check the same session at the bottom of the page hope this makes since
Create an account or sign in to comment