<form action="" method="post"><input type="text" name="name" placeholder="Enter a Monster"></input>  <input type="submit" value="Search"></input></form>


<?php

if(isset($_POST['name'])){
	$_POST['name']=$_POST['name'];
	$_POST['name']=str_replace(" ","_",$_POST['name']);
}

if (!isset($_POST['name'])) 
{			
}
elseif(strlen($_POST['name'])<='1')
{
	
	echo getPanel("warning","Error","You Must enter more than 1 characters");
} 
elseif(getMonsterList($_POST['name'])=='empty')
{
	echo getPanel("warning","Error","No Mobs Found");
}
else
{
$name = $_POST['name'];
$mob = getMonsterList($name);
 echo '<table class="table table-striped">';
	foreach ($mob as $mobs) 
	{
        
//16777216 - (m_zone->GetID() << 12) + targid
$getzid = $mobs['mobid'] - 16777216;
$zoneid = $getzid >> 12;

	echo '<tr><td><a href="?p=monsters&id='.$mobs['mobid'].'">'.$mobs['polutils_name'].' </a></td><td>'.getZoneName($zoneid).'</td></tr>';
	}
 echo '</table>';
}