Custom PHP...
Posted: Sun Feb 15, 2009 9:33 pm
I have a custom index setup for my forum. Looks like this...
I changed it to this...
The PHP i put in doesn't wanna show up, How else could i pull up information from a table on my index?
How could i get my own custom PHP to show up on my index page?
I also tried to put PHP on the template file in the STYLE but that proved no good...
Code: Select all
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? 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('Home');
$template->set_filenames(array(
'body' => 'home_body.html',
));
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>
Code: Select all
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? 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('Home');
$template->set_filenames(array(
'body' => 'home_body.html',
));
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>
<?php
$query = "SELECT * FROM home_body WHERE username='kevin'";
$result = mysql_query($query) or die ("Error in query: $query. ".mysql_error());
if (mysql_num_rows($result) > 0) {
while($row = mysql_fetch_array($result)) {
echo $row["content"];
}
} else {
echo "No rows found!";
}
?>
The PHP i put in doesn't wanna show up, How else could i pull up information from a table on my index?
How could i get my own custom PHP to show up on my index page?
I also tried to put PHP on the template file in the STYLE but that proved no good...