Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts

    echo or redirect?

    Which would be faster...
    Echoing out a short tell-a-freind confirmation page
    or
    just redirecting them to it via
    header("Location: http://site.com/folder/confirm.php");
    ?
    Nothings been cached except the style and form's validation.
    Thx
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #2
    Regular Coder
    Join Date
    May 2003
    Location
    34° 54' N 82° 13' W
    Posts
    996
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Redirect.....

    It'll take like not even a second
    Stevie Peele
    Neverside IRC Network - irc.veonex.net | tc.tutorialnetwork.org
    #dev - any programming,etc. question
    #design - design discussion and critque
    #central - general chat
    Come join us!

  • #3
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    It'll just be the same if the html is the same. Using a header redirect would be easier for you to update the html though

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I've been told that:
    echoing would have a more reliable completion time as you have to deal with pipe clogs when you redirect.
    Comments?
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #5
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,108
    Thanks
    11
    Thanked 101 Times in 99 Posts
    echoing would have a more reliable completion time as you have to deal with pipe clogs when you redirect
    .... and check your dilithium crystals are correctly phased

    header("location:blah");
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Well, if using a header redirect, how would I again post the vars to the redirected page without using a session, etc.?
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #7
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,108
    Thanks
    11
    Thanked 101 Times in 99 Posts
    ah ok , well if there is not too much data you could just pass it bak via GET ?
    PHP Code:
    <?
    header
    ("location:temp.php?var={$_POST['value']}&var2=etc"));
    ?>
    or all at once
    PHP Code:
    <?
    header
    ("location:temp.php?blah=".serialize($_POST));
    ?>
    (you could base64_encode() it as well to look less dodgy :) )
    or as you suggest use sessions, you could indeed use fsockopen and POST the data to your new page as well but thats overkill.

    alternately , you could use apaches mod_rewrite to rewrite the url for you in the first place (wont be available on all hosts)
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #8
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts
    ...or simply echo out the data.
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •