Solved

Link in MYSQL

Posted on 2004-04-02
3
231 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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 …
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

749 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