echo "Passwords dont match"; } } else { echo '<form method ="POST" name="resetform" >Reset Password for<br><select name="user" >'; foreach ($h->getList() as $head) { echo '<option>', $head['username'], '</option>'; } echo '</select><br>Password<br><input type="password" name="password1" /><br>Confirm<br><input type="password" name="password2" /><br><input type="button" name ="reset" value="Reset" onclick="checkPassword(\'resetform\')"/><input type="hidden" name="resetpass" value="resetpass" /></form>'; } break; case 'editcat': //case for editing Catagory Info $c = new Catagory(); if (isset($_GET['catid'])) { if (isset($_POST['editcat']) and isset($_POST['catinfo'])) { if ($c->setInfo($_GET['catid'], $_POST['catinfo']) == 'done') { echo 'Done'; } else { echo "Sorry an error ocurred"; } } else { $catinfo = $c->getInfo($_GET['catid']); echo '<form method="POST" name="catinfoform"><table width="40%"><tr><td>Name</td><td>', $catinfo['name'], '</td></tr><tr><td>Info</td><td><textarea rows="10" cols="50" name="catinfo" >', $catinfo['info'], '</textarea></td></tr></table><input type="submit" value="Change" name="editcat"/></form>'; } } else { echo 'Select a Catgory<br>'; foreach ($c->getList() as $cat) { echo '<a href="admin.php?do=editcat&catid=', $cat['catid'], '">', $cat['name'], '</a><br>'; } } break;