Turn my mysql table's output data into links

Hello to all. I’m learning php, but I’m still at a basic level. I would like to understand two things:

  1. How can I make a specific data of my table in “link” so it can be linked to an article that has been searched
  2. How can I make my php code take similar strings from the contents of the table and not just the same? eg I am looking for “how to create a game” and they must also appear “how to do …” or “how to install a game”
    I leave you the link of my code and the link of the photo of the mysql table
    code Link = Apr 21, 2020 - Codeshare
    image link=https://i.snipboard.io/3lgY0b.jpg

1.To link it you can use html a href attribute,you may create a new column to save your url data then make a processor to retrieve data based on query,if you do it inside echo function it may seem like this
<?php echo " <a href="http://mysite.com/search.php?key='.$row->url.'">'.$row->title.'</a> "; ?>
2.You can search a tutorial how to make a simple search engine and you can learn it structure,something like this one Nick Frostbutter - Articles and How-To's
Hope it helpfully :slight_smile:

4 Likes

Also don’t you show your database if you don’t want something bad happen xD

1 Like

Okay, I’m not going to show my database anymore😅
For the link question, I do not know how to link the link content to the search along with the name and description. Thank you for your help :pray:

1 Like

Ah sorry if you don’t understand what i write,you can try to learn tutorial how to make search engine in php and mysql instead then.Hope you can solve it :wink:

1 Like

ok thx

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.