Auto-Link Text and Pull Info From MySQL DB

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
cblah001
Forum Newbie
Posts: 1
Joined: Tue Aug 03, 2010 4:30 pm

Auto-Link Text and Pull Info From MySQL DB

Post by cblah001 »

I have searched and been unable to find out how to do this. Here is what I am trying to do. My PHP knowledge is very beginner and yet I do not know where to begin with this.

1. I want to make it so that every word in a particular paragraph becomes clickable.
2. When someone clicks on one of the words in that paragraph, a PHP script retrieves information from the MySQL database.
3. The information on that specific word shows up on the page where the paragraph is and the user is able to see it.

Example:

"This is one of the sentences in the paragraph."

The user clicks on the word "sentence" and it retrieves the information from the MySQL DB and reveals "a string of words" for instance. Now obviously each word would have to have a spot in the database which will be a huge task in an of itself but I want to keep it simple before making it huge.

I hope I am not getting in over my head. Even a push in the right direction would be a good start. I think my hardest part is making every word in that paragraph a "clickable link", if you would like to call it that.

Thank you.
Post Reply