Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3233746
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:18:44+00:00 2026-05-17T17:18:44+00:00

I am beginning to develop a website as a personal project, to discover a

  • 0

I am beginning to develop a website as a personal project, to discover a little bit web technologies. My question is more about “how to make the things clean” than a technical question.

Here is the thing:

Let’s say that an index.php page will include an other menu.php, which will permit to navigate the website.

My index.php look like this, basically:

include("header");
include("menu");
include("DEPENDING ON WHICH LINK AS BEEN CLICKED FROM THE MENU");
include("bottom");

To avoid the POST method, and have a lot of stuff on my URL, I would like to do it an other way, but I do not know what is the best one.

I thought about declaring a variable like $page, when a link is clicked, I can do something like “if $page == home”, then I include the home.php page… etc…

I do not know if my question is clear… I know that it will appear as a very easy and beginner question but I don’t even know where to look…

Do you know if I can find any “open source website” so I can study the code and see the best practices about it?

P.S.: Sorry for my english which is probably not perfect at all, I am working on it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T17:18:44+00:00Added an answer on May 17, 2026 at 5:18 pm

    You can have a menu like

    <a href="?view=home">Home</a>
    <a href="?view=home">About</a>
    

    Then on your PHP code

    include $_GET["view"] . ".php";
    

    Note that I am not validating, so any parameter passed on the url would be able to include any file.

    The $_GET returns the values passed to the page through the URL.

    The $_POST returns values posted.

    The $_REQUEST returns both $_GET and $_POST values.

    A good place to study many languages is W3Schools, you could check there sometime.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When beginning a new web project, i'm always a bit worried about removing pieces
I'm at the beginning/middle of a project that we chose to implement using GWT.
So we want to develop a service app (web Service with post/get API). What
Beginning with a basic approach -- Options Menu. Question: What is the best way
I'm a beginning programmer, building a non-commercial web-site. I need a user ID, and
I am just beginning to start learning web application development, using python. I am
Many beginning programmers write code like this: sub copy_file ($$) { my $from =
I'm just beginning to have a look at Objective-C and Cocoa with a view
At the beginning of all my executable Python scripts I put the shebang line:
I'm really beginning to understand what people mean when they say that C++'s error

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.