PHP Tutorial

A web server programming language.

PHP Form Handling

PHP Form Handling

The PHP superglobals $_GET and $_POST are used to collect form-data.

GET vs POST

  • GET: Appends form-data into the URL. Never use GET to send sensitive data. Max URL length is 2048 characters. Useful for bookmarking.
  • POST: Appends form-data inside the body of the HTTP request (not shown in the URL). Has no size limitation. Secure for sensitive data like passwords.

Try It Yourself

Edit the code below and click Run to see the result live.

Source Code
Result
Topics