I have prob with my code its working fine bur, i want to add url to Row Name, When i add them it show error.
Exapmle and code:
<strong><font size="3">
<?php
mysql_connect("localhost", "rooot", "123") or die("Error connecting to database: ".mysql_error());
mysql_select_db("Search") or die(mysql_error());
$query = $_GET['query'];
$min_length = 3;
$max_length = 15;
if(strlen($query) >= $min_length)
{
$query = htmlspecialchars($query);
$query = mysql_real_escape_string($query);
echo "<table border='0' width='' align='left' cellpadding='1' cellspacing='1'>";
echo "<tr><h3>You have searched for $query... Please find the details of $query...</h3></tr>";
echo "<tr align='center' bgcolor='#03acfa' > <td height='35px' width='125px'><b>Name</b></td> <td><b>Type</b></td> <td><b>Address</b></td></tr>";
$result = mysql_query("SELECT * FROM company WHERE (`Name` LIKE '%".$query."%') OR (`Type` LIKE '%".$query."%')") or die(mysql_error());
if(mysql_num_rows($result) > 0)
{
while($results = mysql_fetch_array($result))
{
echo "<tr align='center' bgcolor='#93dafb'><td height='25px'>".$results['Name']."</td> <td>".$results['Type']."</td> <td>".$results['Address']."</td></tr>";
}
}
else{
echo "<tr align='center' bgcolor='#fdee03'><td colspan='2' height='25px'>Sorry..No data found for $query if you are owner for Business company / Organization you can add your content for submiting your content click here</td><tr>";
echo "</table>";
}
}
else{
echo "<tr align='center' bgcolor='#fdee03' font size='10'><td colspan='2' height='25px'>Your search keyword contains letters only ".$min_length;
}
?>
This is the URL:
<?
<td align="center"><a href="Get-Details.php?id=<? echo $rows['id']; ?>">View Details</a></td>
?>