Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/18/2021 in all areas

  1. Editor is a bit buggy with multiple toolbar rows, but I think I got it.
    1 point
  2. Over the lifetime of this (or any other) Application, you will spend far more time reading its code than you will writing any of it so go for whichever form expresses your intention most clearly. Personally, I'd go with the former or, perhaps, an even more concise one: if ( ! isset( $_SESSION['user'] ) ) exit ; if ( 'SiteOwner' !== $_SESSION['user'] ) exit ; I'm not sure of the context in which this runs - perhaps a redirect to another page might be more appropriate than the "exit"? YMMV. Regards, Phill W.
    1 point
  3. if(!isset($_SESSION['user']) || $_SESSION['user'] !== 'SiteOwner') { exit; }
    1 point
  4. Excellent! If anyone asks, you're now applying the Principle of Least Privilege, getting your application work with the minimum level of permissions - just what it needs and nothing more. Also, you are now qualified to laugh openly at anyone that runs their entire Application as root. 😉 Regards, Phill W.
    1 point
  5. Before you can use $_SESSION you must call "session_start()". Put it at the start of the code.
    1 point
This leaderboard is set to New York/GMT-04:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.