Forums

[resolved] Getting data from custom MySQL database (1 post)

  1. S_Dalsgaard
    Member
    Posted 2 years ago #

    I am trying to make a page that gets its data from a database I have made in MySQL. I have made a page that queries the database and puts the relevant data in the right places, but I would like to be able to use one page and populate it based on an ID in the URL.

    I can make the page show the correct data when I use
    $query="SELECT * FROM tvserieguiden_main WHERE show_id='1001'";
    That looks like the following:
    Test 1

    What I would like is to use something like
    $query="SELECT * FROM tvserieguiden_main WHERE show_id=$id";
    and let the show-id be determined in the URL (something like http://........?id=1001)
    An example of the empty page template is here: Test 2

    I don't know if I'm barking up the completely wrong tree, and the solution is something entirely different, but I hope someone has some suggestions.

Topic Closed

This topic has been closed to new replies.

About this Topic