HI,
I have a table in my database that has two fields, one called imgfile1 and the other called url
I can display the image from the imgfile1 field without a problem but what i want to do is create a hyperlink to another website using the address in the url field.
I am very much a novice at this and any help would be much appreciated
my code is below:
PHP Code:
<?php $result = mysql_query("SELECT * FROM banners1") or die(mysql_error()); while($row = mysql_fetch_array($result)){ $imgfile1_txt=$row['imgfile1']; $url_txt=$row['url']; echo '<img src="http://www.webmaster-talk.com/images/'.$imgfile1_txt.'" width="161" border="0"vspace="3"></a>'; } ?>
Last edited by chrishirst; 07-13-2010 at 02:06 PM..
|