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.

techkid

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    techkid reacted to Alluziion in Wrapping my head around sessions and cookies   
    1. Start your sessions before HTML output so you really before the HTML tag.
     
    2. A conditional statement to check whether a user is logged in or has admin privileges with one argument and if not, the second argument would redirect them; you can also use session_destroy();.
     
    And as Jay said, you can do this in a single PHP file and include it where necessary.
     
    I'm not expert myself but it's something that I've been trying to understand myself lately.
  2. Like
    techkid reacted to Jay Gilford in Wrapping my head around sessions and cookies   
    1. You need to start a session on EVERY page you want to use a session. Without doing so the session data can't be accessed
    2. You will need to validate on each page that the user can access the page (ie has a valid session login) before executing code
     
    Using the approach you have, the easiest thing would be to create a new php file - we'll call it bootstrap.php for arguments sake. Now in there you put the session start code and some code to validate the current user session is valid, and if not redirecting to the login page. Then on every page you would add an include to bootstrap.php
     
    The one exception to this would be the login page which you would add the session start to on its own (otherwise you'll end up in an infinite loop)

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.