olly86 -
Joined: 25 Apr 2003 Posts: 993 Location: Wiltshire, UK
|
Posted: Sun Feb 01, 2004 1:21 pm Post subject: PHP & MySQL |
|
|
how do i code this in PHP (i'm a newbee at this so simple talk please :D)
I need the data to be gotten from a MySQL database that I need to be displayed on my site. in 1 of the tables I have 3 fields that I need displaying the first is a URL that needs to be displayed as a URL showing the text from the displayed field as the link text.
I think this is the connect code:
Code: | $link = mysql_connect("host address", "user_name", "user_password")
or die("Could not connect : " . mysql_error());
mysql_select_db("renals") or die("Could not select database"); |
This is what i need to do with it:
the link needs to be using the format "Definition Term"
the URL: http://www.w3.org/
which needs to be displayed as W3C
so you would end up with W3C useing the "Definition Term"
I then need the description bellow shown using the format "Definition"
When it's wrritern it should look like this:
World Wide Web Consortium
The home page of the World Wide Web Consortium.
thanks, i hope i've made myself clear :confused: _________________ Olly |
|