/    Sign up×
Community /Pin to ProfileBookmark

Question about index.php?view=

[B]Friends[/B]

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:

[url]http://www.atlanticsunairways.com/[/url]

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:

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

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!

[B]Nick[/B]

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@PineSolPirateJul 25.2006 — 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 ?)
[code=php]include($_GET['view'].".php");[/code]
It would be safer to have an array and bind pages to keywords.
×

Success!

Help @nstutzman spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...