0

Hi,

I have a problem here and i need some help.
I like to know how to link php code to other pages.

The following is the entire code :

<td bgcolor="#FFFFFF"><? echo $rows['topic'];?></td>

This echo out the topic, but i want this topic to be a hyperlink too - where i can link to other pages. please help!

3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by bear24
0

Simply use the HTML a tag to make it a hyperlink

<a title="link_title" href="link_here"><? echo $rows['topic'];?></a>

In the database you also need to have the unique identifier for the row and make the link something like mypage.php?topicid=ID where ID is the identifier.

0

You can also use PHP functions to create a link - this may be better than hard coding the URL so that you can keep the URL relative to the base of your web application.

Hope that helps!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.