So i am making a very basic site where someone types in a box some text and it posts it into mysql.
Example:
Here is my post with a cool link - htt://www.coolness.com
The following script simply grabs the column wanted from the database and echos it on a line.
<?php
$con = mysql_connect("localhost","####","####");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("####", $con);
$result = mysql_query("SELECT * FROM posts");
while($row = mysql_fetch_array($result))
{
echo $row['post_content'];
echo "<br />";
}
mysql_close($con);
?>
The link is in plain text and instead I would like either php or javascript to write it as a hyperlink by adding the whole bit to it.
I've looked through examples, but nothing seemed to work when I tried to apply them.
Any tips would be great.