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 3978528
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:03:31+00:00 2026-05-20T05:03:31+00:00

I have two buttons. If one button is clicked, part one of the file

  • 0

I have two buttons. If one button is clicked, part one of the file should be displayed. When the other button is clicked, the other part should be displayed.

And you have to be able to switch between those pages anytime.

Anyone an idea how to do this (in php)?

  • 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-20T05:03:32+00:00Added an answer on May 20, 2026 at 5:03 am

    First of all: you really should express what you have already tried to achieve this and why things are not working. This is really basic stuff and after reading the PHP manual and some HTML tutorials, you really should be able to get this thing going on your own.

    The easiest way would be to make your buttons include a different parameter:

    <button onclick="window.location.href='index.php?page=foo';">click me</button>
    <button onclick="window.location.href='index.php?page=bar';">click me</button>
    

    And read out the parameter with PHP:

    <?php
    
    if (isset($_GET['page'])) {
        switch($_GET['page']) {
            case 'foo':
                // include page foo
            break;
            case 'bar':
                // include page bar
            break;
        }
    }
    

    Disclaimer: I said easiest, not most elegant. 🙂

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

Sidebar

Related Questions

I have two radio buttons each with a unique ID. When one is clicked,
In Application i have two buttons in which one button is used as a
I have a page with two buttons, one Button opens a popup window with
I have two radio buttons next to each other, and even though each one
I have a form with two submit buttons. based on the button clicked i've
In my website, user have to upload a file, and should have two buttons
Have two actionsheet buttons and one modalviewcontroller on mainviewcontroller in application. Now for two
I have two dropdown ddlCountry and ddlState and one button Submit. While ddlstate is
I want to have two input with one button for user to enter their
I have two buttons, one for start recording and another for stop recording. i

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.