Forum Moderators: coopster
Here is the code, any help would be great.
<?php
// include function files for this application
require_once('book_sc_fns.php');
session_start();
do_html_header('Adding a book');
if (check_admin_user())
{
if (filled_out($HTTP_POST_VARS))
{
$item_number = $HTTP_POST_VARS['item_number'];
$team = $HTTP_POST_VARS['team'];
$player = $HTTP_POST_VARS['player'];
$catid = $HTTP_POST_VARS['catid'];
$value = $HTTP_POST_VARS['value'];
$description = $HTTP_POST_VARS['description'];
if(insert_book($item_number, $team, $player, $catid, $value, $description))
echo "Book '".stripslashes($team)."' was added to the database.<br />";
else
echo "Book '".stripslashes($team).
"' 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 playerised to view this page.';
do_html_footer();
?>
<?php
// include function files for this application
require_once('book_sc_fns.php');
session_start();
do_html_header('Adding a book');
if (check_admin_user())
{
if (1)
{
$item_number = $HTTP_POST_VARS['item_number'];
$team = $HTTP_POST_VARS['team'];
$player = $HTTP_POST_VARS['player'];
$catid = $HTTP_POST_VARS['catid'];
$value = $HTTP_POST_VARS['value'];
$description = $HTTP_POST_VARS['description'];
if(insert_book($item_number, $team, $player, $catid, $value, $description))
echo "Book '".stripslashes($team)."' was added to the database.<br />";
else
echo "Book '".stripslashes($team).
"' 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 playerised to view this page.';
do_html_footer();
?>
That's my quick-and-dirty fix.
Dan