Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.
<form action="search.php" method="post">
$error = "";
if($_SERVER['REQUEST_METHOD'] == "POST"){
if (empty($_POST['search'])){
$error .="Please enter a search term";
}
}
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
http://www.w3schools.com/tags/att_input_required.asp