Ads by ProfitSence

Pre Defined variables in PHP Code Example

Last Updated on Wednesday 5th Oct 2022

Pre-defined variables

  • $GLOBALS — Used to access global variables from anywhere inside a PHP script
  • $_SERVER — Contains information about the locations of headers, paths, and scripts
  • $_GET — Can collect data that was sent in the URL or submitted in an HTML form
  • $_POST — Used to gather data from an HTML form and to pass variables
  • $_REQUEST — Also collects data after submitting an HTML form