Database searching problems

wxdqz

New Member
I have setup a simple script to search a database according to the user-defined variables.

For some reason, the search script gives me this error:
Parse error: parse error in /home/challengedfrc/search.php on line 242

Line 242 is the last line of the script.
Here is the entire script:
<?
if (!$submit)
{

mysql_connect ($server,$user,$pass);

mysql_select_db (challengedfrc);

$query = "SELECT * FROM library WHERE $querytype LIKE '$querytype%' AND search LIKE '$search%' ORDER BY LETTER DESC" or die("Error in query");

$result = mysql_query($query) or die("Error in query");

while($row = mysql_fetch_array($result))
{
$search = $row["search"];
$querytype = $row["querytype"];
?>
<p>
<b><? echo "$querytype"; ?></b>
Your search, <? echo "$search"; ?>, resulted in: <? echo "$result"; ?>
</p>

What is wrong?
 
Back
Top