I have created a search engine but im facing the following error
Parse error: syntax error, unexpected ';' in C:\xampp\htdocs\vschool\search2.php on line 15
I have created a search form as the following
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Search Contacts</title> </head> <p align="right"><body> <h3 align="right">searching form</h3> <form method="get" action="search2.php" id="searchform"> <p align="right"> <input type="submit" name="submit" value="search"><input type="text" id="search" name="search"> </p> </form> </body> </html>
then i created a page called search2.php with the code below
<?php
$con = mysql_connect("localhost","hashem","hashem");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
$search = $_GET['search'];
mysql_select_db("schoo", $con);
$result = mysql_query("SELECT * FROM persons WHERE MATCH(Number) AGAINST ('$search' IN BOOLEAN MODE )";");
echo "<table border='1'>
<tr>
<th>Name</th>
<th>Grade</th>
<th>Result</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['Name'] . "</td>";
echo "<td>" . $row['Grade'] . "</td>";
echo "<td>" . $row['Result'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);
?>
can you please help with this
regards


Sign In
Create Account

Back to top









