Added labels.

git-svn-id: http://svn.automattic.com/wordpress/trunk@135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2003-06-01 11:43:30 +00:00
parent 733d6f3b7c
commit ab32f497af
1 changed files with 17 additions and 17 deletions

View File

@ -131,30 +131,30 @@ default:
<div class="wrap"> <div class="wrap">
<form name="cats" method="post"> <form name="cats" method="post">
<h3>Edit a category:</h3> <h3><label for="cat_ID">Edit a category:</label></h3>
<p> <p>
<?php <?php
$query = "SELECT * FROM $tablecategories ORDER BY cat_ID"; $categories = $wpdb->get_results("SELECT * FROM $tablecategories ORDER BY cat_ID");
$result = mysql_query($query); echo "<select name='cat_ID' id='cat_ID'>\n";
echo "<select name='cat_ID'>\n"; foreach ($categories as $category) {
while($row = mysql_fetch_object($result)) { echo "\t<option value='$category->cat_ID'";
echo "\t<option value='$row->cat_ID'"; if ($category->cat_ID == $cat)
if ($row->cat_ID == $cat)
echo ' selected="selected"'; echo ' selected="selected"';
echo ">".$row->cat_ID.": ".$row->cat_name."</option>\n"; echo ">".$category->cat_ID.": ".$category->cat_name."</option>\n";
} }
echo "</select>\n"; echo "</select>\n";
?><br /> ?></p>
<p>
<input type="submit" name="action" value="Delete" class="search" /> <input type="submit" name="action" value="Delete" class="search" />
<input type="submit" name="action" value="Rename" class="search" /> <input type="submit" name="action" value="Rename" class="search" /></p>
</form> </form>
</p>
<h3>Add a category:</h3>
<form name="addcat" action="b2categories.php" method="post"> <form name="addcat" action="b2categories.php" method="post">
<input type="hidden" name="action" value="addcat" /> <h3><label>Add a category:
<input type="text" name="cat_name" /><br /> <input type="text" name="cat_name" /></label><input type="hidden" name="action" value="addcat" /></h3>
<input type="submit" name="submit" value="Add it!" class="search" /></form> <input type="submit" name="submit" value="Add it!" class="search" />
</form>
</div> </div>