php header

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
brownrl
Forum Members
Forum Members
Posts: 74
Joined: Thu Sep 23, 2004 11:06 am

php header

Post by brownrl »

Dear all;

Was wondering if this ever got some thoguht:

Alot of times when you make a site and you have some PHP doing some stuff like form validation or db inserts/updates, you will often put this code into the top of the page before any html output. This way if the form validate was good or the db update was good you then could bounce the user over with a header( "Location: thanyou_page"); call.

I had at one a point a field in the cms db on the content table called page_header and an extra text area when editing a page to put this code in. For the most part this kind of would work except when it would go through the smarty compiler some info would get lost like $_POST or $_GET... But then I did another tricky to get that back.

However, with newer versions of cms coming all the time its not really convient to maintain.

Earlier someone from the team mentioned putting this in cmsms and I was wondering whats the status of this happening? At present I am putting a hack into the the main index.php such that  if the file: "page_headers/$_GET['page'].php" exists then I include it right there.

Rob
Post Reply

Return to “Modules/Add-Ons”