Jump to content

How do I retrieve a link from a MySQL database so that it behaves like a link in the PHP page,


Triniton722
 Share

Recommended Posts

Hello.

I have a bit of a problem. When I fetch the link field from the database.i don't see an actual link on the page. 

One more thing, what type of field should I use to store the link in the database? Probably there is where I went wrong.

All help is 

Link to comment
Share on other sites


<?php
$con=mysqli_connect("","root","","tibiblog");
// Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

$result = mysqli_query($con,"SELECT * FROM articles");

while($row = mysqli_fetch_array($result)) {
echo $row['title'] . " " . $row['summary'] . " " .$row['link'];
echo "<br>";
}

mysqli_close($con);
?>
Link to comment
Share on other sites

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • 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.