You are developing an e-commerce site and need to store and retrieve user cart data during their browsing session. Which PHP superglobal would be most appropriate for this use-case?
- $_SESSION
- $_COOKIE
- $_POST
- $_GET
The $_SESSION superglobal is ideal for storing user-specific data across multiple pages during a browsing session, making it suitable for cart data.
Loading...
Related Quiz
- When performing a DELETE operation in SQL, what happens if you omit the WHERE clause?
- You've written a PHP script, but it's not executing correctly. You suspect there's a syntax error. How would you go about debugging this?
- What is the purpose of the if statement in PHP?
- Which cryptographic extension provides generation and verification of digital signatures?
- How is the result set of MySQL handled in PHP?