Click to See Complete Forum and Search --> : dynamic header graphics?


cartermay
07-22-2003, 01:25 PM
I am a simple Dreamweaver/HTML person, but I have recently started messing with PHP and Java a little.

I am really good at doing my own reseach and implementing it, but I am not sure what the correct terminology is for what I am researching! If someone could point me in the right direction I would be ever greatful. Let me try and describe what it is I am looking to do, and then you can all tell me I am insane, or that it is impossible, or whatever...:)

I am creating a "customer service" page for our small property management company. Our general information is the same for each of our hotel properties, so the body of the page can be the same. Instead of re-creating the same page with a different heading for each of our properties, I would like to have the header be (dynamically?) determined based on which url the customer is arriving from. Does that make sense? If so, it is even possible? HELP!

Thanks in advance for any feedback!

pyro
07-23-2003, 07:18 AM
Yes, with PHP it is... You can use get the page they are coming from using $_SERVER["HTTP_REFERER"] (http://us4.php.net/manual/en/reserved.variables.php#reserved.variables.server -- though not 100% reliable.) After you have that, it is just a simple if loop to check which page it was and use include() (http://us4.php.net/include/) to include the correct header.

cartermay
07-23-2003, 09:29 AM
Hey thanks! It helps a lot to just know you are headed in the right direction ... and now I feel I have a direction! I appreciate it very much.

pyro
07-23-2003, 09:32 AM
You're welcome... :) Just post back if you get stuck.