question.php?links=howdoidothis

Codes here !

Moderators: macek, egami, gesf

lookout
New php-forum User
New php-forum User
Posts: 2
Joined: Fri Dec 20, 2002 10:12 pm

question.php?links=howdoidothis

Postby lookout » Fri Dec 20, 2002 10:17 pm

i can't seem to understand how i make a page where i can put links to things, and, depending on the id selected, make it show that particular record from my database. like...

test.php?id=0001

so, the page would display the the template page "test.php" with the infomation that goes along with the primary key "id" that equals "0001." i'm sure you know what i mean...can someone point me in the right direction? thanks...

User avatar
Oleg Butuzov
Last Samuray
Last Samuray
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Postby Oleg Butuzov » Sun Dec 22, 2002 4:03 am

Code: Select all

<?
if (isset($_GET['num'])) { echo "$_GET[num]"; }

echo "<a href=$PHP_SELF?num=1>1</a>";
?>

lookout
New php-forum User
New php-forum User
Posts: 2
Joined: Fri Dec 20, 2002 10:12 pm

Postby lookout » Sun Dec 22, 2002 8:37 am

okay, so I put that for each and every link I want? and I'm guessing that 'num' is where 'id' would go in my example, right? thanks...


Return to “mySQL & php coding”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest