Hello
I get error
Parse error: syntax error, unexpected T_IS_EQUAL, expecting T_VARIABLE or '$' - line 22
I can't see where i have gone wrong
thanks
<html>
<head>
</head>
<body>
<centre>
<h1 style = color:#09r; font-size:36px;">Search</h1>
<form action = "./results.php" method "GET">
<input type = "text" name = "input" size="50" <?php echo $GET ["input"];?>
<input type = "submit" value = "search" />
</form>
</centre>
<?php
$input = $_GET ("input");
$terms = explode(" ",$input);
$query = "SELECT * FROM search";
foreach ($terms as $each) {
$i++;
if ($==1)
$query.="keywords LIKE '%each%' ";
else
$query.= "OR keywords LIKE '%each%' ";
}
//connect to database
mysql_connect ("localhost", " "," ");
mysql_select_db ("test");
$query = mysql_query($query);
$numrows = mysql_num_rows ($query);
if ($numrows >0) {
while ($row = mysql_fetch_assoc($query)) {
$title = $row ['title'];
echo "<h2>$title</h2>";
}
}
else
echo "No results found for \"<b>$input</b>\"";
//disconnect from database
mysql_close();
</body>
</html>

