blob: 58a4a7dfea370faadd25d040b72fbba7236a33a2 [file] [log] [blame]
<?php
/*******************************************************************************
* Copyright (c) 2006 Eclipse Foundation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Nathan Gervais (Eclipse Foundation)- initial API and implementation
*******************************************************************************/
#*****************************************************************************
#
# add_category.php
#
# Author: Nathan Gervais
# Date: Nov 3rd, 2006
#
# Description:
# This file adds a Category to the database
#****************************************************************************
require_once ("includes/header.php");
$category_shortname = htmlentities($_POST['catShortName']);
$description = htmlentities($_POST['description']);
$query = "INSERT INTO categories (category_shortname, description) values ('$category_shortname', '$description')";
$result = mysql_query($query);
echo mysql_error();
?>
<html>
<body>
<h2>Category Added Successfully</h2>
<a href="categories.php">Return to Categories</a>
</body>
<html>