bouncing to another page - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

bouncing to another page

jananijanani Posts: 16Member
Hi,
was wondering whether there was any way to automatically forward a user to another cgi page without them having to do anything.

More specifically, I want to be doing lots of behind the scenes validation stuff, but don't actually want to display any of that, so once it's done 9and everything is satisfied) I want to quickly push the user onto the next page (else they'll be sent back to re-enter data).

Is this possible? If so how? Thanks guys, muchly appreciated.

Comments

  • ManningManning Posts: 1,621Member
    : Hi,
    : was wondering whether there was any way to automatically forward a user to another cgi page without them having to do anything.
    :
    : More specifically, I want to be doing lots of behind the scenes validation stuff, but don't actually want to display any of that, so once it's done 9and everything is satisfied) I want to quickly push the user onto the next page (else they'll be sent back to re-enter data).
    :
    : Is this possible? If so how? Thanks guys, muchly appreciated.

    Yeah, you can use a redirect. This is the most common way:

    header("Location: http://www.yoursite.com/newpage.php");

    The URL you provide is the URL they will be redirected to. Since this modifies the headers, you either have to call this before ANY output is sent to the user (even just whitespace), or you have to enable buffering (Check out http://www.php.net/manual/en/function.ob-start.php to see how to do page specific buffering)
Sign In or Register to comment.