1. Welcome to the forums! Take a second to look at our Beginner's Guide. It contains the information necessary for you to have an easier experience here.

    Thanks and have fun. -NF staff
    Dismiss Notice

Not sure if I am posting this in the right place...

Discussion in 'Technical Difficulties' started by Drk, Oct 3, 2006.

  1. Drk

    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    16
    Joined:
    Dec 20, 2004
    Reputation:
    Nvm I figured it out. Thanks anyways.
     
    Last edited: Oct 5, 2006
    Tags:
  2. Kabuto_o

    Messages:
    194
    Likes Received:
    0
    Trophy Points:
    16
    Joined:
    Jul 7, 2005
    Reputation:
    In other words, your webhost doesn't support PHP at all? If I understand you right on this one, this is how you can do.

    You make the actual php file first of all.
    The php file takes a $_GET['id'], http variable, which is referring to the id of the table in the database.

    An example of this is the following:
    $id = $_GET['id'];

    if someone is on the page index.php?id=5

    the $id variable gets the value 5 in this case. The file is going to take all information from the table with that id value, like this for example:

    "SELECT * FROM your_tbl WHERE id='$id'"

    which is equal to the following if we go back to the example where the user is on the page ?id=5:
    "SELECT * FROM your_tbl WHERE id='5'"

    Some other useful things is to check if the current id actually exist in the table at all. If not, redirect the user to the original page. This prevents someone from inserting their own id which doesn't exist.

    Well, that's about all you need to know, sorry for coming with an half assed explanation.
     
Loading...