Solved

Link in MYSQL

Posted on 2004-04-02
3
224 Views
Last Modified: 2010-04-17
Hi,

I am trying to write a program in PHP and MYQL, which in this program, after geting the information from Database which one one the field of Database is Link to some other pages.

How can I get this link from Database field and visitor be able to click on the link?

Thank you,
M G
0
Comment
Question by:Mohamad_111
3 Comments
 

Accepted Solution

by:
strolfey earned 125 total points
ID: 10746740
I'm a bit confused. Do you mean how do you make the data linkable?

<?php
$query="SELECT link, text FROM table";
$result=mysql_query($query);
while( $data=mysql_fetch_array($result) ) {
  echo "<a href=\"" . $data["link"] . "\">" . $data["text"] . "</a><br>\n";
}
?>

something like that..?
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question