LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Is it possible to have hyperlinks within a database attached to a web server via php? (https://www.linuxquestions.org/questions/linux-newbie-8/is-it-possible-to-have-hyperlinks-within-a-database-attached-to-a-web-server-via-php-772758/)

trist007 12-01-2009 02:22 PM

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?

trist007 12-01-2009 02:37 PM

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.

trist007 12-01-2009 02:39 PM

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!


All times are GMT -5. The time now is 07:44 AM.