Click to See Complete Forum and Search --> : MySql/PhP display items on generated page


marcusami
04-29-2008, 03:39 PM
Alright what I have made is a console very similar to a shopping cart, except you dont buy anything online. An admin logs in uploads up to 3 pictures, a title, a price, a description. It creates a page for each item, and all items are listed on a general page.

The individual pages for each item are actually not calling the info from the db. The pages are created when they submit all the info, pics, price ect with php. So i am changing it so that the individual product page will now instead recall the info from the database - because i realized by hardcoding the info in that the admin couldnt actually go back and edit the information.

But I am pretty stuck on trying to get the generated page to display the information from the database. I am pretty new with mysql/php .

Ive been trying to figure out a way to write the ID of the entry to the new page so I can then look up the product in the DB by its ID and display all information of the product.

Sorry if I made this really confusing but I am confused
If you could help push me in the right direction id appreciate it

thanks
Marcus

chazzy
04-30-2008, 09:14 AM
go to php.net
look up the functions:

mysql_connect
mysql_query
mysql_select_db

and pick up a book
http://www.amazon.com/Beginning-PHP-MySQL-Novice-Professional/dp/1893115518

marcusami
04-30-2008, 09:26 AM
thanks!

I actually do have a database running, and i can put in data, recall it, delete it.

The site is functional, the guy just wants to add new functionability such as being able to arrange products in any order, and being able to edit it. When i had first made it i just posted the info the user submits and generated the individual product page. So that page isnt recalling the info from the database. Therfore its not "editable" for the client, so i am trying to make it when i generate teh new individual page it will show that one product from the database.

So i guess my question is a theory question. I can already generate a page on the fly.

But now I want to generate a page on the fly for a product, and get all the product info from the database instead of justing writing the posted vars to the page.

feewwwwwwwwww.. haha was i confusing?
any ideas or tips are much appreciated
Heres a video of current function
http://www.screencast.com/users/marcusami/folders/Jing/media/db6779c3-5406-4280-8c63-30a1ec28f559
last 30 seconds of video is dead time

regards
Marcus