Jump to content

Having form go to a thanks page


Dragonhome

Recommended Posts

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

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');
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.