I really stop myself into figuring out the search method. I understand that with query we can fetch some rows with result. But how I should make hyperlinks to my page where my is content. Can you put the idea of seach system? Finally i have my result into $result array. But how to make hyperlinks to them?
assuming you have an array called '$results': foreach ($results as $result) { echo "<a href='$result'>$result</a>"; } Code (markup):
Hello, Well if you want to link contents from the search result then do like this $selectQuery = "Your search query" $resultQuery = mysql_query($selectQuery); $numRowsQuery = @mysql_num_rows($resultQuery); if($numRowsQuery>0) { while($rowQuery = @mysql_fetch_array($resultQuery)) { ?> <li><a href='url?page=showContent&contentId=<?php echo $rowQuery['primaryKey']?>'>$rowQuery['tiitle']</a></li> <?php } } PHP: Hey we hope it worked for you Regards Stylesofts Developing Team.
Thanks for your help. Do you mean id to id ? Suppose my site page is now located at mysite.com/?cat=12&page=25 My result is now at $rowQuery And my hyperlink will be href="mysite.com/?cat=$rowQuery['cat']&page=$rowquery['pageid']"
Hey Yes, it is the id..in the database table which u set as the autoincrement.. Regards, Stylesofts Developing Team
maybe u can set variable GET in ur pages..like VB system ... in ur output query ... ex. for end result http://example.com/index.php?highlight=$searchquery nad in ur pages... should set to GET variable.. regards