I understand this.
But when I send a form to a .php file, how do I get that .php file to look like the phpBB forum?
Consider:
"Alpha.php" is this:
Code: Select all
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
page_header('Beta');
$template->set_filenames(array('body' => 'beta.html',));
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>
"Alpha.php" is using the template to display "Beta.html" in the forum's style.
"Beta.html" is this:
Code: Select all
<!-- INCLUDE overall_header.html -->
<h2>My Beta Page :D</h2>
<div class="panel">
<div class="inner">
<span class="corners-top">
<span></span>
</span>
<div class="content">
<!--Begin Form-->
<form action="gamma.php" method="post">
<table border="0" width="50%">
<tr>
<td>
What is your name?
</td>
<td>
<input type="text" name="my_name" size="25" maxlength="25" />
</td>
</tr>
</table>
<input type="submit" value="Submit my Name!"/>
</form>
<!--End Form-->
</div>
<span class="corners-bottom">
<span></span>
</span>
</div>
</div>
<!-- INCLUDE jumpbox.html -->
<!-- INCLUDE overall_footer.html -->
As you can see in "Beta.html", I want the form data passed to "Gamma.php". But I need "Gamma.php" to be displayed like it's a part of the forum.
Example 1 does not work as "Gamma.php":
Code: Select all
<!-- INCLUDE overall_header.html -->
<h2>Gamma!</h2>
<div class="panel">
<div class="inner">
<span class="corners-top">
<span></span>
</span>
<div class="content">
<?php
LALALALLALALA some embedded php content LALALALALALLA
?>
</div>
<span class="corners-bottom">
<span></span>
</span>
</div>
</div>
<!-- INCLUDE jumpbox.html -->
<!-- INCLUDE overall_footer.html -->
... because the embedded php content does not display.
In using "Gamma.php" or "Gamma.html", Example 2 will not work:
(The following page is "Delta.php")
Code: Select all
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
page_header('Gamma');
$template->set_filenames(array(
'body' => 'Gamma.html',
));
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>
... because the PHP form data does not transfer to through this "Delta.php" page and into the "Gamma" page.