M
M
maza2k22018-05-22 15:52:28
PHP
maza2k2, 2018-05-22 15:52:28

How to check query string for parameters in php?

Hello.
There is a link like
https://domain.ru/index.html?parametr1=true¶me...
How can I use php to determine the presence of "parametr1=true" in the query sring in such an http request?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pcsezam, 2018-05-22
@pcsezam

$_GET["parameter1"]

T
ThunderCat, 2018-05-22
@ThunderCat

isset($_GET["parametr1"]) // проверит наличие переменной, независимо от того, есть ли у нее какое-то значение
empty($_GET["parametr1"]) // проверит отсутствие переменной, либо существование, но со значением NULL, false, 0, array() или "".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question