Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Is their a limit in checking sessions

Featured Replies

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

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

  • 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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.