ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

PHP redirect not working

October 11, 2011 11:39am

Subscribe [3]
  • #1 / Oct 11, 2011 11:39am

    hanzo

    2 posts

    I am using the following PHP script on EE:
    http://docs.hubapi.com/wiki/GoToWebinar,_GoToMeeting_Integration

    All seems to work except the redirect:
    header(‘Location:http://www.hanzoarchives.com/solutions/free_webinar_registration_thank_you’);

    Is there something in EE2 that I need to enable to get the redirect working? The PHP script is setup as a Form with PHP enabled. The redirect works fine if the PHP script is hosted on another server not in EE.

    Your help would be appreciated, thank you in advance.

  • #2 / Oct 11, 2011 9:11pm

    the3mus1can

    426 posts

    If you do not have an exit after the header function call try adding one.

    header(‘Location:http://www.hanzoarchives.com/solutions/free_webinar_registration_thank_you’);exit;
  • #3 / Oct 24, 2011 2:10pm

    hanzo

    2 posts

    Hi,

    so the “exit” at the end allows the redirect to work but also means that the rest of the script is not processed and no information is submitted.

    Any other ideas?

    Thank you.

  • #4 / Oct 25, 2011 10:44am

    Kevin Cupp

    791 posts

    Hi hanzo,

    Can you try moving the header() function to the bottom of the script so that everything can process first? This shouldn’t affect how the GoToMeeting code works.

    Kevin

  • #5 / Oct 26, 2011 3:14pm

    hanzo

    2 posts

    Hi Kevin,

    thank you for the tip. It works great now. I moved it and included the exit suggested earlier.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases