LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-01-2009, 03:22 PM   #1
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 70
Is it possible to have hyperlinks within a database attached to a web server via php?


I am running Slackware 13.0 and using apache + php + postgresql, all the latest versions. I am attaching my database to my website. When a user pulls a query the results will be displayed.

Is it possible to have links embedded in the results? For instance a user inputs a genre of games to see all the games in the genre in the database. When the results are returned on the next page, I want a user to be able to click on the title of a game to take them to another screen with screenshots, summary, and ratings.

How would I go about doing this?
 
Old 12-01-2009, 03:37 PM   #2
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,052

Original Poster
Rep: Reputation: 70
Nevermind I got it.

Code:
print "<td width=225>"; print "<a href='http://192.168.1.111/"; echo "$row[1]"; print".html'>"; echo "$row[8]"; print "</a>";print "</td></tr></table>";
I put the link address in $row[8] of the database.
 
Old 12-01-2009, 03:39 PM   #3
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,052

Original Poster
Rep: Reputation: 70
I got it working
Code:
print "<td width=225>"; print "<a href='http://192.168.1.111/"; echo "$row[1]"; print".html'>"; echo "$row[8]"; print "</a>";print "</td></tr></table>";
$row[1] is the title of the game. I make an html file [name of game].html and I put the link address in $row[8] in my database.

PHP rox!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox Can't Follow HTML Hyperlinks To Local Files - Recognize Relative Hyperlinks? Dave Chicago Linux - Newbie 6 03-18-2009 09:07 PM
How to monitor web server, FTP server, Mail server and database server vodka33us Programming 1 06-16-2008 05:20 AM
LXer: Backing up your MySQL database using your web browser and a PHP script LXer Syndicated Linux News 0 04-21-2007 11:16 PM
Hyperlinks not opening in web browser tshontikidis Linux - Software 7 03-28-2006 05:37 PM
Do PHP can make a user base update web site whitout Database? explorer1979 Programming 3 01-05-2005 10:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration