GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 15-Jan-2008, 12:30
Flavs83 Flavs83 is offline
New Member
 
Join Date: Mar 2007
Posts: 6
Flavs83 is on a distinguished road

Help: PHP question


Hey all,

I dont know how to elaborate it. I am trying to make a link interact with php just like this forum.

For example a link http://www.example/index.php?board=10.0 with two topics. The topics have links (http://www.example/index.php?topic=189.0) AND (http://www.example/index.php?topic=188.0) which have same "index.php" and ONLY differ from "?topic="numbers. Clicking on the link will take/load the page.

Can anyone explains how does it work with the code?

Thank You.
  #2  
Old 15-Jan-2008, 20:33
NHDriver4's Avatar
NHDriver4 NHDriver4 is offline
New Member
 
Join Date: Jan 2008
Location: New Hampshire, USA
Posts: 10
NHDriver4 will become famous soon enough

Re: Help: PHP question


This works by running a query on the database, pulling the topic from the id.

So, here's a quick example:

PHP Code:

<?php

$topic_id = $_GET['topic'];

if (!$topic_id)
{
    // Error, or display the main page, there was no topic specified
}
else 
{
    // There was a topic specified, so lets get that topic from the database and show it!
    $sql = 'SELECT * FROM topics WHERE id =' . $topic_id ;
}



?>

__________________
Mat
http://onovia.com
 

Recent GIDBlogFirst week of IA training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP - sizes and generation times cable_guy_67 MySQL / PHP Forum 3 29-Sep-2005 08:26
Question about loading php into tables or css pcxgamer Web Design Forum 6 17-Sep-2005 21:08
Help ! I need help starting up on Php ! onauc MySQL / PHP Forum 11 04-Jan-2005 23:57
Grouping data from MySQL with PHP - Newbie question. giobbi MySQL / PHP Forum 12 27-Feb-2004 00:34
PHP Sessions question JdS MySQL / PHP Forum 2 16-Jul-2002 04:58

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 06:45.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.