<!doctype html>
<meta charset="utf-8">
<title>Наличие поля</title>
<form action="example.php" method="get">
<label>Поиск <input name="q" value=""></label>
<button>Проверить поле</button>
</form>
<p>Поле q пришло. Теперь можно проверить его содержимое.</p>