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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.