You are here: Re: Display selected record that has been passed to URL « PHP Programming Language « IT news, forums, messages
Re: Display selected record that has been passed to URL

Posted by jsaint on 03/10/06 19:56

Ren:

I'm not sure what you're looking for. Basically, your newpage.php will
use code similar to what you must have used on the first page you
describe - the one that lists the records. You will get your primary
key by looking at $_GET["recordID"] and assigning it to a variable
(like $id). Of course you will want to validate this value and make
sure it is an integer and nothing else (search for sql injection
attacks to see why).

Then, you will execute a select against your table like (SELECT * FROM
table WHERE recordID = $id) using the passed recordID. Use the
appropriate functions/syntax (these will differ if you are using PEAR
DB or native php functions, and depending on how you want to display
the data) to navigate through your result set and write out the data as
html.

HTH,
Josh

 

Navigation:

[Reply to this 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

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