I was following a tutorial and i copied word by word i don't know why i get the error.
Error >> Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/*****/public_html/download/url/search.php on line 36

		 $results = $_GET['results'];
		 $terms = explode(" ", $results);
		 $query = "SELECT * FROM search WHERE keywords='$term1'";
		 foreach ($terms as $each) {
				if ($i == 1)
					$query .= "keywords LIKE '%$each%' ";
					$query .= "OR keywords LIKE '%$each%' ";
			// connect
			mysql_connect("localhost", "irnm_tutadmin", "731995");
			$query = mysql_query($query);
			$numrows = mysql_num_rows($query);
			if ($numrows > 0) {
				while ($row = mysql_fetch_assoc($query)){
					$id = $row['id'];
					$title = $row['title'];
					$description = $row['description'];
					$keywords = $row['keywords'];
					$link = $row['link'];
					echo "<h2><a href='$link'>$title</a></h2>
					$description<br /><br />";
				echo "No results found for \"<b>$results</b>\"";
			// disconnect

what is $term1 in your query(line 5)? Where did you define $term1?

Replace your line no 5

$query = "SELECT * FROM search WHERE keywords='$term1'";


$query = "SELECT * FROM search WHERE ";

You're putting the result in $query on line 19, which is a bit strange to me. It shouldn't break things, but it's more clear if you rename that variable to $result.

Also always try to habit of mysql_error so once there is something wrong with query your code wont execute further.

$rs=mysql_query($sql) or die( '<br /><strong>Your Query: </strong>'.$sql.'<br /><br /><strong>Error: </strong>'.mysql_error());

There's a problem with your SQL syntax.