We have a MySQL database which lists web sites, their URLs and a
description.
It contains a table with the following headings:
title | url | description
I want to build a web page which will dynamically create a table showing
the name of the site (which also acts as a link) and it's description...
so looking at the code the finished, parsed page may look like this:
<table>
<tr>
<td><a href=http://www.phpbuilder.com/board/archive/index.php/"http://www.lastminute.com">lastminute.com</a></td>
<td>cheap holiday deals</td>
</tr>
--repeat until table is complete--
</table>
The bit we can't seem to do is to take the name of each web site and
turn it into a link using the URL information.
Now I could just enter <a
href="http://www.lastminute.com">lastminute.com</a> into the database,
but I don't want to, as information will be added by users and this
isn't a very user friendly entry method.
So, does anyone out there know how to do this?
I need a method, using PHP if possible of doing this (in effect):
<table>
<tr>
<td><a href=http://www.phpbuilder.com/board/archive/index.php/"DYNAMICALLY ENTERED URL">DYNAMICALLY ENTERED NAME</a></td>
<td>DYNAMICALLY ENTERED DESCRIPTION</td>
</tr>
</table>
and looping it until there's no more info left in the MySQL table.
any help would be hugely appreciated as much of my intranet project relies on
this process and I now find I don't know how to do it (
thanks very much,
bye - dunstan
description.
It contains a table with the following headings:
title | url | description
I want to build a web page which will dynamically create a table showing
the name of the site (which also acts as a link) and it's description...
so looking at the code the finished, parsed page may look like this:
<table>
<tr>
<td><a href=http://www.phpbuilder.com/board/archive/index.php/"http://www.lastminute.com">lastminute.com</a></td>
<td>cheap holiday deals</td>
</tr>
--repeat until table is complete--
</table>
The bit we can't seem to do is to take the name of each web site and
turn it into a link using the URL information.
Now I could just enter <a
href="http://www.lastminute.com">lastminute.com</a> into the database,
but I don't want to, as information will be added by users and this
isn't a very user friendly entry method.
So, does anyone out there know how to do this?
I need a method, using PHP if possible of doing this (in effect):
<table>
<tr>
<td><a href=http://www.phpbuilder.com/board/archive/index.php/"DYNAMICALLY ENTERED URL">DYNAMICALLY ENTERED NAME</a></td>
<td>DYNAMICALLY ENTERED DESCRIPTION</td>
</tr>
</table>
and looping it until there's no more info left in the MySQL table.
any help would be hugely appreciated as much of my intranet project relies on
this process and I now find I don't know how to do it (
thanks very much,
bye - dunstan