Jump to content

URL hyperlink


dickd

Recommended Posts

Hi I am new to SQL and have tried searching for a answer with no joy, I have a data base that stores members details including URL to there web site.

In the query i have that displays the user details i can not see how to make the url field a click on hyperlink.

I use Dreamweaver 8 for php
Can any one help me or piont me i the right direction, should i be storing them in my database differently (Varchar) or do i do something with my php page

Cheers
Dickd
Link to comment
https://forums.phpfreaks.com/topic/5897-url-hyperlink/
Share on other sites

[!--quoteo(post=358754:date=Mar 26 2006, 10:22 PM:name=maexus)--][div class=\'quotetop\']QUOTE(maexus @ Mar 26 2006, 10:22 PM) [snapback]358754[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Pretty easy, just echo the db field for the url into a html hyperlink.

[code]
<?php
echo <a href="'.$row['userurl'].'">$row['userurl']</a>;
?>
[/code]

Something like that? Of course you will need to adapt it to your code.
[/quote]


Hi my line of code read
<td><span class="style12"><?php echo $row_Recordset1['Web_site']; ?></span></td>

changed to
<td><span class="style12"><?php echo <a href="'$row_Recordset1['Web_site']'">$row_Recordset1['Web_site']</a>; ?></span></td>


I have tried a few combinatins of above but just get a line error i must have missed a quote somewhere
as it says
Parse error: parse error, unexpected '<', expecting ',' or ';' in /home/httpd/vhosts/......../memberdetails.php on line 148
Link to comment
https://forums.phpfreaks.com/topic/5897-url-hyperlink/#findComment-21089
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.