Results in a link question
Hello...I'm new to programming with PHP, but as I'm going through tutorials and reading books I've come across a question I have not been able to figure out.
I have a table with 2 fields....one field is just text and the other is for a URL.
I want to have a link created that uses the url for the link and the text field for the text.
Here is the code I have so far, but I cannot get it to work:
Any help would be appreciated
mysql_select_db('db_name') or die (mysql_error());
$result = mysql_query("SELECT * from patterns");
$row = mysql_fetch_array($result);
echo <a href="$row[lnktxt]">$row[dsptxt]</a>;