Here's what I have:

mypage.php is in my vshare root. mypage.tpl is in my templates folder with the rest of them.

Code:
<?php
/******************************************************************************
 *
 *   COMPANY: BuyScripts.in
 *   PROJECT: vShare Youtube Clone
 *   VERSION: 2.7
 *   LISENSE: http://buyscripts.in/vshare-license.html
 *   WEBSITE: http://buyscripts.in/youtube_clone.html
 *
 *   This program is a commercial software and any kind of using it must agree 
 *   to vShare license.
 *
 ******************************************************************************/

require './include/config.php';

$sql = "SELECT * FROM `pages` WHERE
       `page_name`='" . mysql_clean($_GET['name']) . "'";
$result = mysql_query($sql) or mysql_die($sql);

if (mysql_num_rows($result) != 1)
{
    show_page_not_found();
}

$page_info = mysql_fetch_assoc($result);

if ($page_info['page_members_only'] == 1)
{
    User::is_logged_in();
}

function show_page_not_found()
{
    header("HTTP/1.0 404 Not Found");
    echo "<html><head><title>Page Not Found</title></head><body>Page Not Found</body></html>";
    exit(0);
}

$smarty->assign('err', $err);
$smarty->assign('html_title', $page_info['page_title']);
$smarty->assign('content', $page_info['page_content']);
$smarty->assign('html_description', $page_info['page_description']);
$smarty->assign('html_keywords', $page_info['page_keywords']);
$smarty->display('./templates/header.tpl');
$smarty->display('./templates/mypage.tpl');
$smarty->display('./templates/footer.tpl');
db_close();
In mypage.tpl I have my php code wrapped around the {php} and {/php} tags and nothing else on the page other than my php script. I keep getting "Page not Found" error. Not sure where I'm going wrong.....