plz reply in the easiest form hehe im too newbie

    ROTFLMAO

    I choked on my coke (cola, not class a drug) and it came out my nose

      He was implying that this is a very simple question.

      All you do is this:

      <a href="/index.php?main=something">Click here</a>

        Well, what is it that your trying to do?

          Ok, look; I'm a geek ... you asked a question, I gave an answer. I probably should have said "here's one ..." instead of just "OK..."

          Of course, you're not laughing, are ya? 😃

          Are we to assume that you want the content of "index.php" to change based on the value of the "main" variable in the query string?

          <?php
          
          //index.php
          
          include 'head.html';
          
          if ($_GET['main']=="foo") {
          
           include 'foo.html';
          
          } else {
          
           include 'index.html';
          
          }
          
          include 'foot.html';
          
          ?>

          ??

          For future reference, when you ask a Geek a question, make it the best you know how to make, or it may not be the answer you are looking for ... 😉

            i get this
            Warning: main(i.htm=): failed to open stream: No such file or directory in /var/www/znetwork/main.php on line 238

            Warning: main(): Failed opening 'i.htm=' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/znetwork/main.php on line 238

              Originally posted by idi0tz
              i get this
              Warning: main(i.htm=): failed to open stream: No such file or directory in /var/www/znetwork/main.php on line 238

              Warning: main(): Failed opening 'i.htm=' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/znetwork/main.php on line 238

              its simple, the file called i.htm= doesnt exist

              i think you meant to put i.htm not i.htm= in your inclusion path

                Here is a faster and more reliable method....server can understand it better.
                except the url would be- http://yourname.com/index.php?anything

                case is the name, include is the url. ok?

                ?php
                
                switch($_SERVER['QUERY_STRING']) {
                
                case 'hello':
                include('hello.inc');
                break;
                
                case 'about':
                include('about.inc');
                break;
                
                case 'links':
                include('links.inc');
                break;
                
                default:
                include('main.inc');
                }
                
                ?>
                
                  Write a Reply...