Solved

Link in MYSQL

Posted on 2004-04-02
3
198 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
scoreUp challenge 14 48
triangle challenge 4 77
groupSum6 challenge 6 38
oracle query help 18 78
A short article about a problem I had getting the GPS LocationListener working.
This is an explanation of a simple data model to help parse a JSON feed
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now