【php开源代码栏目提醒】:网学会员鉴于大家对php开源代码十分关注,论文会员在此为大家搜集整理了“insert_category.php”一文,供大家参考学习
<?php
// include function files for this application
require_once('book_sc_fns.php');
session_start();
do_html_header('Adding a category');
if (check_admin_user())
{
if (filled_out($HTTP_POST_VARS))
{
$catname = $HTTP_POST_VARS['catname'];
if(insert_category($catname))
echo "Category '$catname' was added to the database.<br />";
else
echo "Category '$catname' could not be added to the database.<br />";
}
else
echo 'You have not filled out the form. Please try again.';
do_html_url('admin.php', 'Back to administration menu');
}
else
echo 'You are not authorised to view this page.';
do_html_footer();
?>