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!!
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)
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):
[EDIT]
If you want to send informations and get it back, modify your HTML form to POST data at the dispatcher like this:
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:
I hope this will help you with your project