Dragonhome Posted December 22, 2009 Share Posted December 22, 2009 I am taking over a position from another programmer, and want to change some php code, but part of it has me baffled. The code creates a form and after it is filled, the client wants it to go to a separate thank you page – right now, it re-uses the form page as a “thank you” – and the client does not want that. Before the form creation, he has: ----------------------- # FormMail main() # ----------------------------------------------------------------------------- phpfmg_header(); if( !$isHideForm ){ phpfmg_form($sErr); }else{ phpfmg_thankyou(); }; phpfmg_footer(); # ----------------------------------------------------------------------------- and after it has ---------------------------------- <?php if( $sErr ) { print "<script language='javascript' type='text/javascript'>location.href='#error'; fmgHandler.highlight_fields('" . join(',',$sErr['fields']) ."'); </script>" ; }; } // end of function phpfmg_form() function phpfmg_thankyou(){ ?> <h3 align="center">Thanks for your donation!<br /><br /> Your vehicle/vessel has been scheduled for pickup and you will receive a call from the transport company to confirm an appointment. <br /><br /> If you require immediate assistance please call 877-456-3662</h3> <?php } // end of function phpfmg_thankyou() ?> ---------------------------------------------------- Any suggestions and how to get the php to go to a separate thank you page? Thanks in advance Judy [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/186057-having-form-go-to-a-thanks-page/ Share on other sites More sharing options...
trq Posted December 23, 2009 Share Posted December 23, 2009 Change.... phpfmg_header(); if( !$isHideForm ){ phpfmg_form($sErr); }else{ phpfmg_thankyou(); }; phpfmg_footer(); to.... if( !$isHideForm ) { phpfmg_header(); phpfmg_form($sErr); phpfmg_footer(); } else { header('Location: yournewthankyoupage.php'); } Link to comment https://forums.phpfreaks.com/topic/186057-having-form-go-to-a-thanks-page/#findComment-982799 Share on other sites More sharing options...
Dragonhome Posted December 23, 2009 Author Share Posted December 23, 2009 Comes close - the Thank You page comes up, but it is inside the form page rather than on its own page. Link to comment https://forums.phpfreaks.com/topic/186057-having-form-go-to-a-thanks-page/#findComment-982813 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.