![]() |
|
| |||||||
| Notices |
| mySQL & PHP Discussions, information and help with mySQL and PHP. |
![]() |
| | LinkBack | Thread Tools |
|
#1
| ||||
| ||||
| I have a php display script that takes data from a flat file db and transforms it into an array and then displays that info in a table. No problems with this. Each line of data in the db contains 8 items. The first item is the genre or group identifier. For example: cars|2001|Dodge|Blue cars|2003|Chevy|Green truck|2006|Dodge|Black What I would like to do create a link to the display script. That link URL would contain or pass a variable (the genre / group identifier) to the display script that in turn displays only those items inside that genre or group. The display script is below: PHP Code: Andy
__________________ My diamond in the rough - www.123gpp.com * Click here for some BV tutorials (Php mailto Form, I-Frames, Picture display and much, much more!) |
|
#2
| ||||
| ||||
| Apparently there are issues with the forum as I could not edit my above post. Note- I have only listed 4 items for brevity in the db example. Additionally- in the display script, I have not displayed the genre in the table on purpose. Andy
__________________ My diamond in the rough - www.123gpp.com * Click here for some BV tutorials (Php mailto Form, I-Frames, Picture display and much, much more!) |
|
#3
| ||||
| ||||
| Hi Andy, PHP Code:
__________________ Navaldesign Logger Lite: Low Cost, Customizable, multifeatured Login script Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more.... Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA! |
|
#4
| ||||
| ||||
| Naval- YOU ROCK! That was incredibly simple and it works perfectly. Thanks again! Reason: Currently I have about 125 pages each that lists businesses. So for Alarm Companies one would go to alarm_companies.html. But- I can enter all the businesses in a db and then use one page with the php script to get only those businesses that pertain to those that were requested. Thus effectively allowing me to have only two pages that serve up hundreds of pages worth of data. I hope you get what I mean. I also did this: I am making a page (scrollable) with all the links to the various businesses / services for my directory. The link is made like this; <a href="my_db.php?pg_genre=alarm_companies">Alarm Companies</a><br /> And in the script I have: $pg_genre = $_GET['pg_genre']; That way I do not need a form for them to fill out. Very excited. I am going to be up all night! Talk to ya later and thanks again. Andy
__________________ My diamond in the rough - www.123gpp.com * Click here for some BV tutorials (Php mailto Form, I-Frames, Picture display and much, much more!) |
|
#5
| ||||
| ||||
| Yes, that is a very common way of passing values from a page to another. I use it myself all the time. I also use forms, if more than one values are to be passed (in that case i use database driven independent fieds or dependent (chained) dropdowns).Well done Andy!
__________________ Navaldesign Logger Lite: Low Cost, Customizable, multifeatured Login script Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more.... Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA! |
|
#6
| ||||
| ||||
| Naval- I also made the table scrollable and placed that code inside an html box. In this manner- it is more SE friendly than an I-Frame containing the table. Have a look at this site. I believe it will be a good resource to others that you help along the way. http://www.htmlbasix.com/scrollingtable.shtml Lots of cool stuff on that site. Cheers- Andy
__________________ My diamond in the rough - www.123gpp.com * Click here for some BV tutorials (Php mailto Form, I-Frames, Picture display and much, much more!) |