- 2
i make small search engine without connect DB
<html> <html lang="en"> <head> <title>Simple Search</title><meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="" type="text/css"/> </head> <body> <form action="search.php" method="GET"> <input type="text" width="90px" height="8px" name="names"> <input type="Submit" value="Search"></input> </form> </body> </html> Please see below php file
1 Odpowiedź
- 2
this is search.php file
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
</html>
<?php
$name = array('microsoft','google','yahoo');//please add any kewords on array
$co = $_GET['names'];
if(!empty($co))
{
if($co == $name['0'] || $co == $name['1'] || $co == $name['2'])
{
echo $co;
}
else
{
echo '<b>'.$co.'</b>'.' '.'Keyword not aviliabel on array please add then continue'.' '.'<b>'.'Match not found'.'</b>';
}
}
else
{
echo "Please enter any keyword";
}
?>
Dear friends you can add more security. any thing else this project please post answered.