variable passed from another page

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
tomrconsulting
User
Posts: 3

variable passed from another page

Post by tomrconsulting »

Can I create a php report that uses a variable that is passed from another page. What I have is a table with 40 Building in it. I want to pass the building ID to the report page so I don't have to create the same report 40 times and have 40 files I have to store

I have a page that the user pick a building and the form passes the varaible (building_id)to the next page where I have links to pop windows for three different reports from three different views of a table shows different fields. I can do it now but I must create 3 php reports for each building that storing 120 reports how can I automate this.

<?php echo "Interior_".$building."list.php"?>

I'm using this statement in a Java script to launch the correct page but I have 120 reports can I pass the id into the report and have it create the report on the fly


Webmaster
User
Posts: 9430

Post by Webmaster »

You should use single table with a field of building ID. Enabled Advanced Search or Extended Search for the page and you'll be use URL parameter like xxxlist.php?x_BuildingID=yy.


tomrconsulting
User
Posts: 3

Post by tomrconsulting »

Ok I got the url to work but it won't filter down to one building

the field is bldg_id

some the file is Interior_1list.php

so I trying /Interior_1.php?bldg_id=006

for building 006

I get all the building with or without the parameter


tomrconsulting
User
Posts: 3

Post by tomrconsulting »

I figured it out. I left the x_ out


Post Reply