php - How to retrieve the value of selected id from a table or "list" -
i'm new in php. need regarding getting value selected id
. have list of data inserted database , selected of data database. meaning value of data display on page.
what want when select "id=1" table or list direct page display value of "id=1" same "id=2" , onward. link page won't create page each id template value of selected id number table.
the traditional , simplest approach is:
make "list" database table. add new row table when want add product.
put value of primary key column in url, in query string.
http://example.com/products.php?product_id=123
read value $_get
, use it in database query information needed generate page.
output page data in it.
prettier urls can achieved url rewriting. might want @ mvc frameworks implement routing , convenient methods define nicer uris.
Comments
Post a Comment