Jump to content


Link to database file

  • Please log in to reply
1 reply to this topic

#1 chico1st

  • Members
  • PipPipPip
  • Advanced Member
  • 60 posts

Posted 15 August 2006 - 01:39 AM

Okay ive never done this before but i need to make a link to a page which will bring up a database entry.

lets say that i know the ID of the entry as $id
does it just go?

<A HREF=magicpage.php?id=$id>go here</a>

which leads to magicpage.php
where some of the code would be

$id    = $_GET['id'];
$query = "SELECT name, type, size, content FROM magicdatabase WHERE ID = '$id'";

sorry ive never dealt with this, and im away from MY computer so i cant test it.
After this i should be out of your hair, and I cant tell you how thankful I am for all your help, you are all awesome people! :D

THANKS for any help you can offer

#2 fenway

  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 15 August 2006 - 01:50 AM

Sounds like you're got both ends figured out.. that's pretty much all there is to it.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users