...

View Full Version : using anchor tag in php



sudhakararaog
01-16-2008, 09:32 AM
i need to insert a hyperlink to an sql query. there is a field in the table called url which consists of the url of a page, i would like this information to be displayed as a hyperlink so that i can click on the link.

following is the code =

$sql = " SELECT Count(*) .....";
$rs_newEnquiries = mysql_query($sql, $connEnquiry);

$echoStr = "<table width='80%' cellpadding=1 cellspacing=1 border=0><tr bgcolor='#cccccc;'><th bgcolor='#cccccc' width=10>Count</th><th bgcolor='#cccccc' width=400>Url</th></table>";
while ($row_rs_newEnquiries = mysql_fetch_assoc($rs_newEnquiries))
{
$echoStr .= " <tr bgcolor='#ebebeb' class='default'> <td> ".$row_rs_newEnquiries['url']."</td>
}

please advice how i can convert this information that is being displayed into a hyperlink.

thanks.

StupidRalph
01-16-2008, 09:52 AM
$echoStr .= " <tr bgcolor='#ebebeb' class='default'> <td> <a href='".$row_rs_newEnquiries['url']."'>".$row_rs_newEnquiries['url']."</a></td>\n";



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum