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!

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.

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!

Thanks everyone.
It has being helpful!

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.