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

  • Home
  • SEARCH
  • 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 8240607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:32:40+00:00 2026-06-07T20:32:40+00:00

hello guys i badly need your help, php noob here, im creating a bulletin

  • 0

hello guys i badly need your help, php noob here,

im creating a bulletin board-like calendar and it shows the different entries each month. the calendar is divided into 4 quarters hence, i have a php file per quarter. each file displays the months for that quarter and their respective entries. example; my firstq.php contains entries for january, february and march.

i dont have a submit button in any of the page, just a drop down linked image of 1Q, 2Q, 3Q, 4Q that redirects to each file.

how could i declare that when i click the 1Q image it would display the file firstq.php but the url is still index.php and so on?

my default index.php shows 3rd quarter since its july now.

  • 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-06-07T20:32:42+00:00Added an answer on June 7, 2026 at 8:32 pm

    You could add a parameter to the url that determines which page you’re on.

    <?php
    
    // at the top of the page
    
    $quarters = array('Q1', 'Q2', 'Q3', 'Q4');
    $quarter = 'Q1';
    
    // don't allow access to any file on your system
    if( isset($_GET['quarter']) && in_array($_GET['quarter'], $quarters) ) {
      $quarter = $_GET['quarter'];
    }
    
    // switch the short syntax to a filename
    switch($quarter) {
      case 'Q1' :
        $quarter = 'firstq.php';
      break;
      case 'Q2' :
        $quarter = 'secondq.php';
      break;
      case 'Q3' :
        $quarter = 'thirdq.php';
      break;
      case 'Q4' :
        $quarter = 'fourthq.php';
      break;
    }
    

    And then this in the page where you are ready to include it.

    <?php include_once $quarter; ?>
    

    Your links to each quarter would look like this.

    <ul id="quarters">
      <li><a href="index.php?quarter=Q1"><img src="images/Q1.jpg" /></a></li>
      <li><a href="index.php?quarter=Q2"><img src="images/Q2.jpg" /></a></li>
      <li><a href="index.php?quarter=Q3"><img src="images/Q3.jpg" /></a></li>
      <li><a href="index.php?quarter=Q4"><img src="images/Q4.jpg" /></a></li>
    </ul>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello guys and thanks for your help as always. I am stuck on Asp.NET
Hello Guys can you help me for creating a TextView in title bar so
hello guys i need small help in understanding file system of android Now in
Hello guys maybe you maybe can help . here is my problem For example
Hello guys. I think it isn't possible just using PHP, but just to be
Hello guys i try to get an object global/persistent over more than one php
hello guys i need to sort some elements of integer in an integer array
Hello guys I need to pass a string array over to a setter that
Hello guys! Here: #include <stdio.h> char* getStr( char *c ){ scanf( %s , c
Hello guys I am working on a prolog game and I need to write

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.