links within the header tag

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anfetienne
    Contributor
    • Feb 2009
    • 424

    links within the header tag

    i previously posted about a transfer code from one server to another but i have worked it out. this post is to to with the same code but different matter.

    at the top of the code i have the header tag for when it's finished processing. The code below gets variables from a prevous page one of which is the return url after comepletion. the url with $return looks like this "http://theauctionwinne rs.com/resources/templateEdit.ph p?template=0&ID =987768090"

    is there anyway i can use this variable with the header tag?

    Code:
    <?php
    header ("Location: templateEdit.php");
    session_start();
    $imgFLDR = $_GET['rand'];
    $returnURL = $_GET['return'];
    
    echo $imgFLDR;
    echo $returnURL;
    ?>
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    I don’t see, why you can’t.

    but your posted code does not make any sense. if you use the Location header (after that the script is usually terminated), you’re redirecting to another page, so why do you have additional commands that probably don’t get executed?

    Comment

    • anfetienne
      Contributor
      • Feb 2009
      • 424

      #3
      i took out the header when i was testing to make sure the variables are set but forgot to delete the echos....

      how would i add the variable to the header tag

      header ("Location: $var");?

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        given that you define $var as desired, yes.

        Comment

        • anfetienne
          Contributor
          • Feb 2009
          • 424

          #5
          ok thanks ill test this

          Comment

          • anfetienne
            Contributor
            • Feb 2009
            • 424

            #6
            the header wouldn't work with a variable so i used javascript to redirect once all processes have been run instead.

            still on the point of this api....does iframes cut out some of the functionality of certain things?

            Comment

            • Dormilich
              Recognized Expert Expert
              • Aug 2008
              • 8694

              #7
              Originally posted by anfetienne
              the header wouldn't work with a variable so i used javascript to redirect once all processes have been run instead.
              are you sure the variable is correct? (it works for me)

              Originally posted by anfetienne
              still on the point of this api....does iframes cut out some of the functionality of certain things?
              are you asking for PHP, HTML or Javascript issues?

              Comment

              • anfetienne
                Contributor
                • Feb 2009
                • 424

                #8
                im just asking generally.....d on't know how to class it since im using php to write a javascript code that automatically resizes an iframe and loads a page inside it

                Comment

                • Dormilich
                  Recognized Expert Expert
                  • Aug 2008
                  • 8694

                  #9
                  of course there are, frames ain’t despised for nothing.

                  Comment

                  • anfetienne
                    Contributor
                    • Feb 2009
                    • 424

                    #10
                    lol i see that now....can i show you what i'm trying to deal with?

                    Comment

                    • Dormilich
                      Recognized Expert Expert
                      • Aug 2008
                      • 8694

                      #11
                      only if it can’t be avoided… *gg*

                      Comment

                      • anfetienne
                        Contributor
                        • Feb 2009
                        • 424

                        #12
                        ill private message you with details

                        Comment

                        • Markus
                          Recognized Expert Expert
                          • Jun 2007
                          • 6092

                          #13
                          Originally posted by anfetienne
                          ill private message you with details
                          Questions shouldn't be taken to PM - that is against our forum guidelines. Please continue the conversation in this thread.

                          Comment

                          • anfetienne
                            Contributor
                            • Feb 2009
                            • 424

                            #14
                            its not a question....im just showing him the project ive been working on and what the iframe is doing to be such a pain..... but as i have my confidentiality to consider i can't post a username and password for the site on in a question

                            Comment

                            • Dormilich
                              Recognized Expert Expert
                              • Aug 2008
                              • 8694

                              #15
                              I can’t spot the problem you mentioned.

                              Comment

                              Working...