blob: 144fde8ad434e8281b5bdd9ca9743f5b9b9c0100 [file] [log] [blame]
* 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
* Contributors:
* Nathan Gervais (Eclipse Foundation)- initial API and implementation
# categories.php
# Author: Nathan Gervais
# Date: Nov 3rd, 2006
# Description:
# This page displays the contents of the categories DB.
require_once ("includes/header.php");
$query = "Select * from categories";
$result = mysql_query($query);
echo mysql_error();
<h2>Category Database Contents</h2>
<table border="1">
<td>Category ID</td>
<td>Category ShortName</td>
<td>Long Description</td>
<? while ($dbiterator = mysql_fetch_array($result))
$id = $dbiterator["category_id"];
$shortname = $dbiterator["category_shortname"];
$long_desc = $dbiterator["description"];
<td><a href="edit_category.php?id=<?=$id;?>">Edit</a>
<td><a href="delete_category.php?id=<?=$id;?>">Delete</a>
<h2>Add a Category</h2><br/>
<form action="add_category.php" method="POST">
<td>Category Shortname :</td>
<td><input name="catShortName" type="text"></td>
<td>Long Description :</td>
<textarea name="description" rows="10" cols="50" wrap="off">
<td><input type="submit" name="submit" value="Add Category"/></td>