Page 1 of 1

GET and POST Explained Simply

Posted: Thu Apr 23, 2026 8:26 pm
by MegaTux
When beginners start learning HTML and PHP, they often come across the terms GET and POST. At first, they may sound confusing, but the basic idea is actually simple. GET and POST are two common methods used to send data from a browser to a web server.

A good example is a form on a website. If a user fills out a search box, a login form, or a contact form, that information needs to be sent somewhere. This is where GET and POST come in. They define how the data is sent.

What is GET?

With GET, the data is sent in the URL.

For example, if someone searches for “linux” on a website, the URL might look like this:

/search.php?query=linux

Here, the value linux is sent as part of the web address.

GET is useful when:

the request is simple
the data is not sensitive
the result should be easy to bookmark or share
you want parameters visible in the URL

Typical examples:

search forms
filter options
page numbers
category links

In PHP, GET data is usually read with:

$_GET['query']


What is POST?

With POST, the data is sent in the body of the request, not in the URL.

This means the information is not directly visible in the browser address bar.

POST is useful when:

the form sends sen…login to view the rest of this post