Reply to Re: Passing database info into URL

Your name:

Reply:


Posted by Jerry Stuckle on 04/13/06 15:52

maxvalery@gmail.com wrote:
> Hi,
>
> I have been scouring the Internet for a good read on creating webpages
> whose address depends on data retrieved from a from via GET method OR a
> MySQL database ... but counldn't find anything decent.
>
> For example, want to create ten pages about 10 different items.
> Because I want the header, the footer, the navigation to remain the
> same from page to page, I'd like each page to NOT be a separate html
> file, but be referenced by something like
> http://<mysitename>/items/index.php?item_ID=1. Kind of like separate
> WordPress posts.
>
> How would I do something like that and where would I read about it?
>
> Thanks.
>

Not too hard - basically, you have a structure similar to:

Code to fetch data from database based on the id
Page header information
Generated data from the database
Page footer information

The reason the code is at the start is often times you might want to change the
<title> contents to reflect the item being retrieved.

As for examples - they're all over the net. Basically anything which uses a
database for the back end does it.

Of course, if the list of items is fixed, you can create 10 pages for them, but
use one header and one footer file, including them in each of the other 10
files. That way you have common headers and footers.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация