I have been trying that, is in my code at the moment but for some reason it doesn't do anything. That's what has me stumped...

    Yep on the second page I have this 🆒

    echo $_GET['topic'];

    While the first page is this .....

    echo "<a class=\"nav\" href=\"index2.php?topic=technology\" target=\"_top\">Technology</a>&nbsp;|&nbsp;\n";
    echo "<a class=\"nav\" href=\"index2.php?topic=enterprise\" target=\"_top\">Enterprise</a>&nbsp;|&nbsp;\n";
    echo "<a class=\"nav\" href=\"index2.php?topic=research\" target=\"_top\">Research</a>&nbsp;|&nbsp;\n";
    echo "<a class=\"nav\" href=\"index2.php?topic=government\" target=\"_top\">Government</a>&nbsp;|&nbsp;\n";
    echo "<a class=\"nav\" href=\"index2.php?topic=people\" target=\"_top\">People</a>&nbsp;|&nbsp;\n";
    echo "<a class=\"nav\" href=\"index2.php?topic=lifestyle\" target=\"_top\">Life Style</a>&nbsp;|&nbsp;\n";
    echo "<a class=\"nav\" href=\"index2.php?topic=opinion\" target=\"_top\">Opinion</a>\n";

      The value is entering into the url like it should
      ie. ?value=opinion

      but nothing at the other end. I will have to play around for a while I think.

        Do you have a session_start() in the page you are sending the URL info to?

          Yes its there. I have had sessions working for a month without a problem so I cant figure it out.

            What about making it a session variable instead of url encoding? The session is working fine in both these pages.

            There are more ways to skin a php cat....

              At the moment it is just the shell of a page with the echo.

              <?php

              session_start();

              ?>

              <html>
              <head>
              <title>Display Categories</title>
              <link rel="stylesheet" type="text/css" href="stylesheets/styles.css">
              </head>

              <body class="search">

              <?php

              echo $_GET['topic'];

              ?>

              </body>
              </html>

              There is nowhere I can see that it could be having trouble.

              The sending page though is much larger.

              <?php

              session_start();

              echo $topic;

              ?>

              <html>
              <head>
              <title>Top</title>
              <link rel="stylesheet" type="text/css" href="stylesheets/styles.css">
              </head>

              <body class="top">
              <?php

              echo "<h1 class=\"title\">i-Web</h1>\n";
              echo "<h2 class=\"subtitle\">News Monitoring Service</h2>\n";

              echo "<form method=\"post\" name=\"searchform\" action=\"display_categories.php\" target=\"main\">\n";

              echo "<div class=\"login\">\n";
              echo "<p>You are logged in as $loginname&nbsp;&nbsp;&nbsp;<a href=\"index3.php\" target=\"_top\" value=\"changeprofile\">Change $loginname Profile</a>&nbsp;&nbsp;&nbsp;<a href=\"index6.php\" target=\"_top\" value=\"addarticles\">Add Articles</a>&nbsp;&nbsp;&nbsp;<a href=\"index.php\" target=\"_parent\">Log Out</a></p>\n";
              echo "</div>\n";

              echo "<div class=\"navbar\">\n";
              echo "<p>\n";

              echo "<a class=\"nav\" href=\"index7.php\" target=\"_top\">All News Home</a>&nbsp;|&nbsp;\n"; // go to default_login.php -->

              echo "<a class=\"nav\" href=\"index2.php?topic=technology\" target=\"_top\">Technology</a>&nbsp;|&nbsp;\n";
              echo "<a class=\"nav\" href=\"index2.php?topic=enterprise\" target=\"_top\">Enterprise</a>&nbsp;|&nbsp;\n";
              echo "<a class=\"nav\" href=\"index2.php?topic=research\" target=\"_top\">Research</a>&nbsp;|&nbsp;\n";
              echo "<a class=\"nav\" href=\"index2.php?topic=government\" target=\"_top\">Government</a>&nbsp;|&nbsp;\n";
              echo "<a class=\"nav\" href=\"index2.php?topic=people\" target=\"_top\">People</a>&nbsp;|&nbsp;\n";
              echo "<a class=\"nav\" href=\"index2.php?topic=lifestyle\" target=\"_top\">Life Style</a>&nbsp;|&nbsp;\n";
              echo "<a class=\"nav\" href=\"index2.php?topic=opinion\" target=\"_top\">Opinion</a>;\n";

              echo "</p>\n";
              echo "</div>\n";

              echo "<div class=\"searchbar\">\n";
              echo "<select name=\"searchlist\">\n";
              echo "<option selected value=\"1\">ALL</option>\n";
              echo "<option value=\"2\">WORLD</option>\n";
              echo "<option value=\"3\">NATIONAL</option>\n";
              echo "<option value=\"4\">LOCAL</option>\n";
              echo "</select>&nbsp;&nbsp;&nbsp;\n";

              echo "<input class=\"searchtext\" type=\"text\" name=\"searchval\" size=\"40\">&nbsp;&nbsp;&nbsp;\n";

              echo "<input class=\"searchbutton\" type=\"submit\" name=\"search\" value=\"Search\">\n";
              echo "</div>\n";
              echo "</form>\n";

              if ($logout)
              {
              session_unset();
              session_destroy();
              }

              ?>
              </body>
              </html>

              ................................

              Any ideas would be greatly appreciated as it is kind of a project stopper. Thanks everyone.

                Hi, I can't work this out. Why doesn't this url encoding work here. It puts the ?topic=technology or whatever into the url bar but I can't get it to echo on the next page.

                Here is my sending code....

                <?php

                session_start();

                ?>

                <html>
                <head>
                <title>Top</title>
                </head>

                <body>
                <?php

                echo "<form method=\"post\" name=\"searchyform\" action=\"\display_categories.php\" target=\"main\">\n";

                echo "<a class=\"nav\" href=\"index7.php\" target=\"_top\">All News Home</a>&nbsp;|&nbsp;\n";

                echo "<a class=\"nav\" href=\"index2.php?topic=technology\" target=\"_top\">Technology</a>&nbsp;|&nbsp;\n";
                echo "<a class=\"nav\" href=\"index2.php?topic=enterprise\" target=\"_top\">Enterprise</a>&nbsp;|&nbsp;\n";
                echo "<a class=\"nav\" href=\"index2.php?topic=research\" target=\"_top\">Research</a>&nbsp;|&nbsp;\n";
                echo "<a class=\"nav\" href=\"index2.php?topic=government\" target=\"_top\">Government</a>&nbsp;|&nbsp;\n";
                echo "<a class=\"nav\" href=\"index2.php?topic=people\" target=\"_top\">People</a>&nbsp;|&nbsp;\n";
                echo "<a class=\"nav\" href=\"index2.php?topic=lifestyle\" target=\"_top\">Life Style</a>&nbsp;|&nbsp;\n";
                echo "<a class=\"nav\" href=\"index2.php?topic=opinion\" target=\"_top\">Opinion</a>\n";

                echo "</form>\n";

                ?>
                </body>
                </html>

                And here is the page that is echoing, or should be....

                <?php

                session_start();

                ?>

                <html>
                <head>
                <title>Display Categories</title>
                <link rel="stylesheet" type="text/css" href="stylesheets/styles.css">
                </head>

                <body class="search">

                <?php

                echo $_GET['topic'];

                ?>

                </body>
                </html>

                If anyone can tell me how the superglobal may be stuffed, or whatever, any workarounds would much be appreciated. Ciao

                  OK further tracking and testing (listen may learn a bit) shows that. In my other similar page it calls

                  href="index?topic=technology"

                  and it works fine. This was done as an experiment. Unfortunately it is pre-login version so I can't possibly give them the content there. Was an experiment.

                  *Now check this out.. the one that doesn't work says

                  href="index2?topic=technology"

                  This is because I have frames working on the site (big hassle but stuck in project specs, don't blame me). If I try to use url encoding to any page that isn't a product of the initial index page the superglobal doesn't work. Only for pages using the original index page.

                  Unfortunately to save complexity (I thought) I created another index2 page to field off other frames sections where the top frame was post login. Here is the error of my ways..

                  So ## QUESTION TO ALL AND SUNDRY

                  Given that it is impossible to pass url encoding between these two pages (and 6 days to project due = 50+ pages) then is there another way to do this??

                  As sessions are working fine is there a way to set a session variable to say "$topic = technology" when the url is clicked. Because conceptually this should be able to be done, even if I don't know the answer myself.

                  So interesting stuff! I apologise if I might have appeared short in this thread but it is a bit testing to be constantly asked the same simple coding stuff once you get past that level. So thanks everyone who contributed. Much appreciated.

                  Any input on this point of the game would be appreciated, too.

                  Ciao

                    Remodelling project's structure. This will be cure...

                    Thankyou all..

                      Hm..

                      Stupid (hopefully) question but ehh..

                      When you say that "If I try to use url encoding to any page that isn't a product of the initial index page the superglobal doesn't work",

                      do you mean you have a link to a frame, and you want one of the pages in the frame to change to a certain topic?

                      That will NOT work, since the FRAME defines specific pages to be loaded, and in their definitions, the variable is not defined, unless you put that in your frames defitinition.

                      Anyway. Your session.. I think the only way to really do that would be by having an in-between page, which will register the variable in the sesion, and thenload the next page. But you SHOULDN'T have to. I thnink that there is a logical mistake in the way the site was set-up.

                      Use print_r($GET) on the pages where you want to use tha passed variables,m to check the content of the $GET array. THink that will help you a lot in solving the problem.

                      J.

                        Yes this was an initial not looking at integeration in tech specs etc. Oh my god I've done it again!! 🆒

                        Anyway, what it is is that when you want to change multiple frames in a site you use target=_top. Top being the index, top of the heirarchy. So you basically program your index page to give out the frames pages depending on input set by a flag. It gets icky after a while.

                        Anyway all of my pre-login frames are set up on index.

                        To ease complexity I chose to use index2, index3, index4 for delivering post-login frames pages. This works fine for sessions.

                        But, so I have discovered, it doesn't work fine for url encoding for some reason. I also have a menu tree I am integrating and it uses url encoding too. So it is time to remodel the frames delivery. A low tech but icky task at best.

                        So now I am wiser and stronger and slightly less sane, and I now know never to let anyone force me to use frames against my will in the rest of my career. I am doing a uni project by the way. 🆒

                        A lesson to us all. Personally I don't even use tables unless I have to lol. My website is www.nortypig.com if you want a look at what I am about. Blog linked to it of course.

                        Thanks for the help all, cyas on the dark side.

                        Ciao

                          Oh so what i am saying is as long as you go via index.php at the top of the heirarchy you can easily pass info between frames via url encoding.

                          Sessions are unaffected by it all.

                          Ciao

                            The url encoding problem still exists. Site rebuild, all frames pages being processed by index.php but not able to pass values via url encoding POST-login. Very late night.

                            Just thought I would mention my theory was disproven... wrong again.

                            Any more ideas

                            :rolleyes:

                              Hi Porco,

                              Plac this line:
                              print_r($GET);
                              on the pages for which you cannot get the variables to pass, and look at the source of the resulting output (page-> view source). This will give you an idea what IS in the $
                              GET array. That way you have an idea of whether the variable is not passed, or whether it is modified / emptied etcetc.

                              J.

                              PS: Hobard? My colleage is moving there in 3 weeks, bought a nice stretch of land close to the coast, and is building a house with his girl there. Supposed to be an increadible place!

                                done it...
                                nothing in the get array
                                something like Array(0) {} if i recall

                                scarey ay

                                late for uni lecture, gotta run 🆒

                                  Leatherback
                                  Noooo tell your friend to turn back its alll liesssss. They eat people here and the women are all sheep....

                                  That's why I never leave the computer to go outside.

                                  God if they find out I said this they will come and take me away to be tourist sandwiches......

                                  Yep empty Get Array..... grrr

                                  I spoke to a phd this morning and he says because I am going through the frames page index2.php I am definately losing the variable there.

                                  I thought frames pages were just container pages really. So my page calls frames page calls other pages. He says I just need to store it as a session variable on the frames page, but no luck there either. It must be my 5 hours sleep and off to lectures...

                                  Maybe I'm a bit thick 🙂

                                  ciao

                                    Hi,

                                    That's what I thought (And mentioned earlier, I think 😃 ) What you can do:

                                    In your index.php which holds the frame definition:

                                    
                                    <frameset rows="100,*" border="0">
                                        <frame name="top" src="top.php" marginwidth="10" marginheight="10" scrolling="no" frameborder="0" noresize">
                                        <frame name="main" src="content.php?main=<? echo $GET['main']; ?>" marginwidth="10" marginheight="10" scrolling="auto" frameborder="0" noresize >
                                    </frameset>
                                    
                                    

                                    which should transport your variables.

                                    Hehe, No, I do not believe that all woman are sheep on Taz. Although I know that the rumour about sheep and rubber bots comes from down under..
                                    Get some sleep. I have just fallen out of bed, and am on my way to my PC at work. :-(

                                      Mmmm I had tracked it back to the frames but never realised I had to pass the variable to the frames page too. Live and learn.

                                      page1.php --> index.php(frames page) --> page2.php

                                      I had just thought of frames page as director of traffic lol. Ouch.

                                      But have been trying to set the session variable on the frames page without any luck. So I am not sure if I am doing things right. It is getting dark here and I can see an early night.

                                      That was the subheading on the website and the blog giving grief wasn't it?? I commented them out for now, don't know why I never did that a month ago when the problem came to my notice on Firebird. Too busy, and it happens when its your own site, nobody to phone and demand to eat the back of your head loudly.... Gave it a mention in the blog, too. 🆒

                                      But for now I still can't get the variable to pass. The pain is that with index the way it is set up it doesn't have that problem. Grrr.

                                      I will try some more, collapse, eat a steak, shower, try some more and hit bed.

                                      Seriously, Tasmania is fine (in summer).

                                      Ciao

                                        Hi,

                                        Have you tried to copy-> paste the snippet of my last post in an empty page, safe it to say index2.php (For testing) and opening
                                        index2.php?main="Testingthis" ? THen you can look at the source of the index2.php page in your browser, and check wether it gives the var back to the frame. If so, I think you are 1 step closer to the solution?

                                        J.