PHP Mysql auto hyperlink help please
Posted: Wed Jan 15, 2014 11:43 pm
Here is what I have so far:
$query = "SELECT * FROM band ORDER BY Name ASC";
$result = mysql_query($query);
while($band = mysql_fetch_array($result)) {
echo "<p>" . "<b>" . $band['Name'] . "</b>";
echo "<br>" . $band['website'] . "</br>";
echo "<br>" . $band['Description'] . "</br>";
*** I want to make it so when displayed, it finds all instances of a link (in the Website and the Description fields (Description is a text box entry), and auto converts to a hyperlink (when entered for the website www.example.com it comes back http://www.example.com etc.)
I have found dozens of examples online but I don't know how to retype them to make it work for mine.
Many thanks!!!
$query = "SELECT * FROM band ORDER BY Name ASC";
$result = mysql_query($query);
while($band = mysql_fetch_array($result)) {
echo "<p>" . "<b>" . $band['Name'] . "</b>";
echo "<br>" . $band['website'] . "</br>";
echo "<br>" . $band['Description'] . "</br>";
*** I want to make it so when displayed, it finds all instances of a link (in the Website and the Description fields (Description is a text box entry), and auto converts to a hyperlink (when entered for the website www.example.com it comes back http://www.example.com etc.)
I have found dozens of examples online but I don't know how to retype them to make it work for mine.
Many thanks!!!