Peter Butler
Jul 14 2005, 08:21 PM
I'm making a front end for a mysql database.
A combination of forms initially return a short-list of possibles to browse
to. Titles column is hotlinked.
QUOTE |
Help required here>>> Is it possible to (using php) hotlink to the same page (template???) with every link BUT use different data from the database |
to populate it... depending on which TITLE you clicked on?
QUOTE |
What I want to avoid: Creating 2000 identical full details HTML pages to sit on the server. As the titles change, appear and disappear... all I want |
to do is edit the database and the new pages must be served!!! Like magic!!!
I mean.... this is what this stuff does.... doesn't it???
I am self taught php for only 6 months... and if any one confirm that this
is what is meant by a template, I would very much appreciate it. And if
so... can you also direct me to the appropriate tutorial?
thanking you in advance
buttle
cape_town
SA
Geoff Berrow
Jul 14 2005, 08:30 PM
I noticed that Message-ID: <[Email Removed]> from Peter
Butler contained the following:
QUOTE |
A combination of forms initially return a short-list of possibles to browse to. Titles column is hotlinked.
Help required here>>> Is it possible to (using php) hotlink to the same page (template???) with every link BUT use different data from the database to populate it... depending on which TITLE you clicked on?
|
Of course! When you generate the links you use the row id. So you'd
end up with something like:
<a href='details.php?id=123>Link to record 123</a>
<a href='details.php?id=124>Link to record 124</a>
<a href='details.php?id=125>Link to record 125</a>
On your details page $_GET['id'] will contain the id of the record you
need. Sanitise the value (look up mysql_real_escape_string) and use it
to fetch the details from the database.
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011