i would really like to know how to have say, index.php and only the text change according to the ?id= or whatever afterwards, could someone please direct me to a site that would tell me how to do this...? or send me a example of a site like this...?

    this site has tons of examples for that.. just search the forums

      do you have any links? because ive been here for one day, and you've been here a while and you probaly know where things are...😉

        Do you mean to have the address bar say something like www.yourdomain.com/index.php?id=X where X refers to a link that was clicked on by a user?

        If so that's a simple switch statement... search the forums for examples either under "select case" or "switch case"

        Easy stuff 😉

          Usually when you see something like this, it means that you are including another file based on what $id is equal to.

          Let's say you have 3 files: index.php, hello.php & goodbye.php:

          index.php says:

               if (file_exists("$id.php")) {
                   include "$id.php";
               }
          
            else {
               print "Page Not Found";
            }
          

          Then if you go to http://www.whatever.com/index.php?id=hello, it will include whatever is in hello.php into index.php. And if you go to http://www.whatever.com/index.php?id=goodbye, it will include whatever is in goodbye.php and so on...

          Hope that helped!

            thanks, that did help alot!

              Write a Reply...