自分のウェブサイトですばやく検索したい。値が入力され、好みのキーワードと一致すると、そのページにリダイレクトされます。
これまでのところ、これは私が得たものです:
<form method="get" action="redirect.php" >
<input id="search" name="search" type="text" value="Search Here" />
<input name="submit" type="submit" value="Go" />
</form>
<?php
if(isset($_GET['submit']));
$product1_keywords = array('animal feeds', 'weanrite', 'Wean Rite');
// my preffered keywords
$search = $_GET['search'];
// caller of entered value on text field ???
if ($search = $product1_keywords) {
// if value of text field is matched with my preferred keywords
// Redirect page if match
header('Location: http://localhost/equalivet_2/#products/wean_rite.html');
}
else {
// Redirect page if not match
header('Location: http://localhost/equalivet_2/not_found.html');
}
?>
お願い助けて。ありがとうございました。