your welcome to join but no.

the 2 pages are seperate...

sms.php / email.php

thats why u dont really think i can have contact in the string because its page=contact so a contact page need 2 be there right?

    Well, basically, if the contact page is not the page with email and sms, I don't really see the reason for calling it a section.. Save yourselve half a headache, and just make a link directly as page=sms??

    Or am I missing the point here? Of course I cannot see your design here, but to me it sounds like you are making a lot of pages which might as well be combined. Isn't email and SMS part of contact details?

    J.

      well if u go to the contact page the link wud be:
      index.php?page=contact& section=email

      and it says thanx for your email we will reply within 24 hours if you would like to contact as us faster send us an sms by CLICKING HERE

      CLICKING HERE = index.php?page=contact& section=sms

        Ah, I see.

        Well, if there is no contact page, there is not really a reason for calling it, is there?
        I still think you could just use:

        index.php?page=email

        CLICKING HERE = index.php?page=sms

        and then using the short switchscript suggested by trooper. < I like it a lot! >

        Perhaps if you want to keep track of which area of the site you are in, you could set a var. area=contact. (Becaus you are in fact not using a contact page, but an SMS / email page!)

        The way you program it has to be clear to YOU or the person who will maintain. The links itself don't have to be clear to the person USING the pages!

        Just my 2 cents.

        J.

          Hee hee - don't you just love it when someone says the same thing but posts it quicker than you ? 😃

          Why have a page and a section?

          For example if you want to send an email you'd simply point them to the email page. Am i understanding this correctly ?

          If so then there is no real need for the page variable. Either that

          simply use

            index.php?$section=email
          or
          index.php?$page=email
          

          I think you are making things more complicated than they need to be

          Can you let me know if my asssumption above is correct, if so then that'll help a lot

          HTH]
          GM

            Hey Trooper,

            You know what they say about minds which think alike!?

            😉 :rolleyes: 😃

            J.

              Yeah i know - but man you must be sat on this post just waiting for replies 😃

                Forcer - assuming that leatherback and i are correct (that yo udon't need page and section the following code will do what you want)

                <?php
                
                $page = $_GET['page'];
                
                if(!$page)
                {
                   include "splash.php";
                
                }else{
                
                  if(file_exists("${page}.php"))
                  {
                
                 include "${page}.php";
                
                  }else{
                
                 include "cgi/404.php";
                
                  }
                
                }
                ?>
                In this snippet i have removed the section as you don't need both section and page.
                
                HTH
                
                GM
                

                  Well, you know... Have nothing to do.. Waiting for my girlfriend to get back from work.. So I just monitor PhPBuilder. Learn a bit, and program again on monday.

                  Have a great weekend.

                  😉

                  J.

                    ok thanx i'll just do that then, but eitherway i'll need 2 add a second switch because i have an artist page but this will be easier because their will actually be artists.php

                    index.php?page=artists

                    and if they clcik on artist 'trooper' the link will be:
                    index.php?page=artists&artist=trooper

                    🙂

                    anyway thanx

                    btw you'z can check out my site @ www.swsm.net

                    🙂

                      Also guys cause we are not having lots and lots of options

                      we are not using a switch statement.

                      HTH

                      GM

                        Write a Reply...