Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

PHP Simple PHP question

  1. Jan 14, 2007 #1

    JamesU

    User Avatar
    Gold Member

    Is there another way to redirect in PHP other than the header(location:) method....? such as one that can be used in a function.
     
  2. jcsd
  3. Jan 15, 2007 #2

    verty

    User Avatar
    Homework Helper

    Download the PHP manual, it has all you need to know.
     
  4. Jan 15, 2007 #3

    -Job-

    User Avatar
    Science Advisor

    You can use Javascript to redirect using:
    Code (Text):

    <script>
    window.location = '[PLAIN]https://www.physicsforums.com';[/PLAIN] [Broken]
    </script>
     
    So one alternative is to redirect using PHP to write that on top of a page.
     
    Last edited by a moderator: May 2, 2017
  5. Jan 15, 2007 #4

    DaveC426913

    User Avatar
    Gold Member

    Big help verty... :uhh:


    The two listed are the two I use, but I'm not a whiz.
     
  6. Jan 16, 2007 #5

    verty

    User Avatar
    Homework Helper

    Dave, teach a man to fish...
     
  7. Jan 16, 2007 #6

    DaveC426913

    User Avatar
    Gold Member

    This is a help forum. He's come here for help because he didn't find the answer.

    With your philosophy, this entire Physics board would be one page: a keyword search of Amazon.com. :tongue2:
     
  8. Jan 16, 2007 #7

    verty

    User Avatar
    Homework Helper

    I'm not that harsh. I knew others would answer. I think in some browsers a window might pop up saying "the page is trying to redirect" if your redirect is to a different server.
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook




Loading...