Forum Moderators: coopster

Message Too Old, No Replies

Converting a database result into links

database results

         

designedbylucas

9:04 pm on Aug 24, 2009 (gmt 0)

10+ Year Member



Ok, here comes the easiest answer and the dumbest question; I really want to learn about database and PHP; how do I make these results clickable (links)?

<td><?php echo $row_Clients['field1']; ?></td>
<td><?php echo $row_Clients['field2']; ?></td>
<td><?php echo $row_Clients['field3']; ?></td>
<td><?php echo $row_Clients['field4']; ?></td>

smatts9

9:27 pm on Aug 24, 2009 (gmt 0)

10+ Year Member



Well you need to know the url you want to construct and then what anchor text you would like. One or the other should be coming from the database, but most likely both.

<td><a href=http://example.com/<? echo URLinfo ?>><? echo AnchorText ?></a></td>

designedbylucas

10:58 pm on Aug 24, 2009 (gmt 0)

10+ Year Member



Thanks for the info, what I want to do is that field #3 or 4 the result should be displayed in the form of a link;

[edited by: coopster at 11:37 am (utc) on Aug. 25, 2009]
[edit reason] no personal urls please TOS [webmasterworld.com] [/edit]