Jump to content

Making table output a link


drlego

Recommended Posts

In the code below I would like to make the output of the 'url' an actual link.

<td><?php echo $row_thisone['url']; ?></td>

Can someone please tell me the proper syntax.

I have tried many things with no luck.

 

The database i created has a field called url.  The data in that field is a url.

example=http://www.yourdomain.com

 

So when that data outputs to the table, I would like it to be an actual link.

 

Thanks in advance!

 

Here is the whole thing:

 

 

<table border="1">

<tr>

<td>site_name</td>

<td>link_text</td>

<td>url</td>

</tr>

<?php do { ?>

<tr>

<td><?php echo $row_thisone['site_name']; ?></td>

<td><?php echo $row_thisone['link_text']; ?></td>

<td><?php echo $row_thisone['url']; ?></td>

</tr>

<?php } while ($row_thisone = mysql_fetch_assoc($thisone)); ?>

</table>

 

</body>

</html>

<?php

mysql_free_result($thisone);

 

mysql_free_result($hi);

?>

Link to comment
https://forums.phpfreaks.com/topic/93454-making-table-output-a-link/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.