fbpx

What are PHP superglobals? Provide examples of at least three superglobals and explain their uses.

Superglobals are built-in variables that are always accessible, regardless of scope. Three examples are:

  • $_GET: Used to collect form data after submitting an HTML form with the method="get".
  • $_POST: Used to collect form data after submitting an HTML form with the method="post".
  • $_SESSION: Used to store session variables across multiple pages.

# Dream job to realty