I am new to php and I am looking for a flat file database system which will allow me to call different product prices from the flat file database. So basically I have a page that lists many different products. For each product I want to list the price. So I would do a search for each individual product code and then return the appropriate price. Can this be done? And can someone point me in the right direction because I don't even know where to start. I first tried doing this using cgi and some ssi's. However due to multiple ssi's on one page (for mutiple prices) it was too slow and so I was recommended to use php. I would be very grateful to someone who can help me. Please note, the only functionality i really need is for the text file to be searched on and to be able to return a price or code value. Thanks in advance.

It would be really much easier to help you if I knew the format of your "flat file database". If this really is a text file rather than a real database I would suggest you'd move on to mysql or similar if you only can. And if you can't paste some records from that file so we can help you.

Ok, well I can't really move to mySql for lack of support. However i can use any delimeted type database (eg , or ; or | etc). The fields would be like...
Product_Code, Product, Price, Supplier. I want to be able to search on the product code and display the price. Do you think this is possible??? Thanks heaps for your help.

I am also not sure what other databases I can use but I am open to suggestions (but not solutions such as msql, mysql etc as I believe they are not supported on my server and that they would be overkill anyway). I am not sure if DBM would be a suitable type solution but I am still unsure how to implement a system using this as well. Thanks again.

I tried this code but couldn't get it working Does this code allow me to use multiple search type items on the one page? I need at least say 20 or so. I was thinking the top part where it opens the file could be at the top, say in the head tag. Then whenever I need to pull in code use the find and print bit. Would that work? Also, are you able to send me an example page you have used as I tried the one you sent and couldn't get it working. Thanks for your help.

Ok, well I have something finally working due to some help from WDN. However because I want to seek multiple items on the one page I want them to be displayed in the order that I want them, not the order that they appear in the database. However I am having trouble using the rewind command. I cannot get it to work properly. Here is what I have so far. Can someone please suggest where to put the code to rewind to the start of the file so that I get the results in the order that I seek for them. Thanks in advance...

well the idea was to have this code inside my existing page. So i would have a beginning <head> tag etc. Also it wouldn't be going through a loop. It would only go through once. Perhaps if I show you a page that will demonstrate how I want to lay it out. This page I was able to link the prices using cgi but you will notice it is very slow to load. The cgi brings in the prices that are in bold. I merely call the code of the product I want and make it return the price. This is the same type of thing i want to do with my php. Here is the page... http://www.microway.com.au/catalog/listcpp_addons1.stm

As for the suggestion about using the | and & I don't think it would help me much as i will know which product to call in so I just will search on that and return the price. And I will want several, each below its respective description.