<html>
<head>
<title> company search result</title>
</head>
<body>
<h2> Search results</h2>
<br>
<?php
$db = mysql_connect("localhost","root","123456");
mysql_select_db("ms", $db);
$query = "SELECT * FROM companydetails where busname like '%".$name."%';
$result = mysql_query($query);
while ($record = mysql_fetch_assoc($result))
{
while (list($fieldname,$fieldvalue)= each ($record))
{
echo $fieldname.": <b>".$fieldvalue."</b><br>";
}
echo "<br>";
}
?>
<br>
<a href="h.html">click here to go back to the serch page.</a>
</body>
</html>
This is the message appeared after executing this script:
Parse error: syntax error, unexpected ':' in C:\xampp\htdocs\xampp\c.php on line 16
What is wrong with this script guys.