php header
Posted: Mon Mar 21, 2005 10:08 am
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
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