ONLINE TELEKOM ONLINE TELEKOM - 2 months ago 10
PHP Question

PHP $_GET hide url

I am making some PHP code for my hosting web page.
I am creat some search domain filed on page with $_GET to chack if domain was available. I need to protect my $GET function in code.

I have some $_GET code in PHP to proceesing searching of domain.

if(isset($_GET['search'])){
$domena = ($_GET['search']);
}


HTML CODE
I have submit button with FORM POST ACTION and i get url:

www.domain.com/index.php?search=domain.com


I need know how i can hide url ?search=domain.com ?
Is that possible ?

Note - i dont want some AJAX or other code, its make possible in PHP?

Answer

If you want to hide search parameter, then send it by POST method and accept it by $_POST instead of $_GET.

if(isset($_POST['search'])){
    $domena = ($_POST['search']);
}