I am trying to avoid undefined index. I have used isset also but i am unable to get the desired results.
<body>
<FORM NAME ="form1" METHOD ="POST" ACTION = "test.php">
<INPUT NAME = "search" size="74">
<INPUT TYPE = "Submit" Name = "SearchButton" VALUE = "Search">
</FORM>
<?php
$search = isset($_POST['search']);
//$search = $_POST['search'];
if (!isset($_GET[$search])) {
// category isn't set
echo 'not set';
}
else {
echo 'set';
}
?>
I think you want