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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:02:37+00:00 2026-05-20T01:02:37+00:00

I am new both to PHP and new to Facebook… I am trying to

  • 0

I am new both to PHP and new to Facebook…

I am trying to create a button that by clicking on it, the next page will be called ,

how can I do that and still remain in Facebook framework?

I tried using an HTML button with reference to next PHP page, but it took me out of Facebook framework…

and I need to use variables from the calling page.

can someone help me?

Thank!!

  • 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-20T01:02:38+00:00Added an answer on May 20, 2026 at 1:02 am

    In PHP, you should always use a “Dispatcher” in your top level directory, and hide your other classes in subfolders, with appropriate permissions.

    Doing so, here is what you can do:

    index.php (dispatcher)

    <?php
    switch($_GET['p']) {
     case 'home':
        include './include/home.php';
        break;
     case 'anotherPage':
        include './include/anotherPage.php';
        break;
     default:
       include './include/home.php'; 
       break;
    }
    ?>
    

    And now, all you have to do is to call your Facebook page like this (sorry, I don’t remember the exact facebook url for application):

    http://www.facebook.com/yourapp/?p=home
    http://www.facebook.com/yourapp/?p=anotherPage
    

    [EDIT]
    If you want to send informations and get it back, modify your HTML form to POST data at the dispatcher like this:

    <FORM METHOD=POST ACTION="./?p=anotherPage">
    

    Than, modify the “anotherPage.php” to verify the POST data, process it and maybe set the data you want back in $_SESSION[‘myVariable’]. Once everything is done, redirect the page to the initial one:

    <?php
    session_start();
    if (ISSET($_POST['myData']) && $_POST['myData'] == 1) {
        $_SESSION['myVariable'] = "HelloWorld";
    }
    header('Location: http://www.facebook.com/myApp/?p=home');
    

    I hope this will help you with your project

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

Sidebar

Related Questions

I'm trying to create a bbcode filtering solution that works with both PHP and
I am pretty new to both php and SQL. I have a login page
I am trying to create a custom tab for a facebook page and it
I am trying to create a custom tab for a facebook page and it
Before reading, please note that I am very new to both PHP and MYSQL.
Hi im new to both android and java i have php page in my
I'm trying to get both bundles working together so that a new user is
I am new to both PHP and the Codeigniter(v2.0) framework. Hoping you can help
I'm totally new to PHP and MySQL but I'm implementing the Facebook PHP SDK
I'm new to both XML and PHP but I have this project and this

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.