Code:
<form action="" method="post">
<input type="text" name="data" />
<input type="submit" name="submit" value="Search" />
</form>
<?php
if(isset($_POST['submit'])){
$search = $_POST['data'];
$array = array('USA','Uk','Canada','France');
if(in_array($search,$array)){
print "The input exists in Array";
}
else {
print "The input does not Exists in Array";
}
}
?>
Comments
Post a Comment