
<html>
<div>
<form action="category_add.php?action=insert" method="post">
分类名称：<input type="text" name="text1" id="text1"/>
<input type="submit" value="提交"name="action">
<input type="reset" value="重置">
</form>
</div>
</html>
<?php
include_once("functions/database.php");
include_once("functions/page.php");
include_once("functions/is_login.php");
get_connection();
$categoryName= $_REQUEST['text1'];
$insertString1="insert into category values(null,'$categoryName')";
$resuleSet2=mysql_query($insertString1);
if(isset($_REQUEST['action']))
echo $categoryName."分类已添加成功！";

?>

