www.webdeveloper.com
Results 1 to 2 of 2

Thread: Question about index.php?view=

  1. #1
    Join Date
    Jul 2006
    Posts
    2

    Question about index.php?view=

    Friends

    Is there a way to combine all of your scripts into one single script using the PHP equivalent of something like an HTML anchor? A good example of what I'm trying to do is the shown by following site:

    http://www.atlanticsunairways.com/

    Each time you click on one of thier navigation buttons, "Join" for instance, the page returns thier join form and the address bar now reads:

    http://www.atlanticsunairways.com/index.php?view=join

    I am under the impression that all of the code for this site is contained within thier index.php file. If I am wrong here, can someone explain what's going on. Also, if I am right, is there documentation on how to achieve this sort of organization? Any help would be greatly appreciated!

    Nick

  2. #2
    Join Date
    Jul 2006
    Location
    Nebraska
    Posts
    380
    It is either all in one page (not likely and rather gross to maintain) or it is including a file using that variable. The other option is it's all in a database and it pulls from there. I'd guess an include though.

    You would do something like this (highly insecure version )
    PHP Code:
    include($_GET['view'].".php"); 
    It would be safer to have an array and bind pages to keywords.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles