How to fix 'Notice Undefined index:'
<p>I received the following error message when I go on searchproduct page. How may i fixed it?</p>

<p>Notice: Undefined index: dosageForm in C:\xampp\htdocs\prism\searchproduct.php on line 29</p>

<p>Notice: Undefined index: dosageForm in C:\xampp\htdocs\prism\searchproduct.php on line 32</p>

<p>Notice: Undefined index: strengths in C:\xampp\htdocs\prism\searchproduct.php on line 35</p>

<p>Notice: Undefined index: strengths in C:\xampp\htdocs\prism\searchproduct.php on line 38</p>

<pre><code>if($_POST['dataType']!= "") {
  $dataType = $_POST['dataType']; 
}else{
  $dataType = $_GET['dataType']; 
}

if($_POST['drugCategory']!= ""){
    $drugCategory = $_POST['drugCategory']; 
}else{
    $drugCategory = $_GET['drugCategory']; 
}

if($_POST['productName']!= ""){
    $productName = $_POST['productName']; 
}else{
    $productName = $_GET['productName']; 
}

if($_POST['brandName']!= ""){
    $brandName = $_POST['brandName']; 
}else{
    $brandName = $_GET['brandName']; 
}

if($_POST['dosageForm']!= ""){
    $dosageForm = $_POST['dosageForm']; 
}else{
    $dosageForm = $_GET['dosageForm']; 
}

if($_POST['strengths']!= ""){
    $strengths = $_POST['strengths']; 
}else{
    $strengths = $_GET['strengths']; 
}
</code></pre>

<p>i am getting same type of error ,</p>

<p>please help me to resolve</p>