I have database which contains a details of company in a table.I also have the php code in which i can display the searched query data from database.everything works fine, the problem is i want to display all the searched query data in their respective pages,once again am repeating i want to display the query results in a dynamic page(the page is solely responsible for the searched query).
php and html code
<body>
<div class="heading">
<div class="logotext">
<p style="margin:0px"><a href="../index.php" style="color:black">Clore</a></p>
</div>
<div class="searchbox">
<div class="SearchBar">
<form action="search.php" method="GET">
<input style="box-shadow: 0 2px 2px rgba(0,0,0,0.19), 0 2px 5px rgba(0,0,0,0.23); " list="myCompanies" id="suggest" type="text" name="q" placeholder="Start typing keywords...." autocomplete="off"><datalist id="myCompanies">
</datalist>
<div class="SearchBut">
<input style="box-shadow: 0 2px 2px rgba(0,0,0,0.19), 0 2px 5px rgba(0,0,0,0.23); " type="submit" value="Search">
</div>
</form>
</div>
</div>
</div>
<div>
<?php
$conn = mysqli_connect("mysql.hostinger.in","u402378368_clore","clore.cf","u402313368_clore") or die("could not search");
$set=$_GET['q'];
if($set){
$show=("SELECT * FROM table1 where name LIKE '%$set%' OR about LIKE '%$set%' OR founder LIKE '%$set%' OR ceo LIKE '%$set%' OR headquaters LIKE '%$set%' OR established LIKE '%$set%' ") or die("could not search");
$result = mysqli_query($conn,$show);
$num_rows = mysqli_num_rows($result);?>
<div class="nrezdez"><?php
if($num_rows == 0){
echo "No Results Found For * ".$set." * "."<br>";
}
else if($num_rows ==1){
echo "Found ".$num_rows." Result <br>";
echo "Showing Result For * ".$set." *"."<br>";
}
else if($num_rows > 1){
echo "Found ".$num_rows." Results <br>";
echo "Showing Results For * ".$set." *"."<br>";
}
?></div><?php
while($rows = mysqli_fetch_array($result)){
?>
<div class="redez"><?php
echo "<strong>Name: </strong><a href=".$rows['link'].">".$rows['name']."</a>"."<br> <br>";
echo "<strong>About: </strong>".$rows['about']."<br>";
echo "<strong>Founder: </strong>".$rows['founder']."<br>";
echo "<strong>CEO: </strong>".$rows['ceo']."<br>";
echo "<strong>Revenue: </strong>".$rows['revenue']."<br>";
echo "<strong>Headquaters: </strong>".$rows['headquaters']."<br>";
echo "<strong>Estd: </strong>".$rows['established']."<br>";
?>
</div>
<?php
}
}
?>
</div>
</body>
please help me how can i display results in their respective pages. why i need this help because, google will index web pages, but in my case i am displaying data in a single page in which my website will not be indexed by google, but if i display data of the searched query in their respective page google will be indexing my page. thank you