2 require 'include/head.inc';
3 require 'include/db.inc';
4 require 'include/common.inc';
5 require 'include/prefs.inc';
7 if(isset($_POST['submit']) && $_POST['exname']!="" && $_POST['groupname']!="") {
8 $db->query("DELETE FROM prefs WHERE key='exname'");
9 $db->query("INSERT INTO prefs (key,value) VALUES ('exname','" . trim($_POST['exname']) . "')");
11 $db->query("DELETE FROM prefs WHERE key='groupname'");
12 $db->query("INSERT INTO prefs (key,value) VALUES ('groupname','" . trim($_POST['groupname']) . "')");
14 block("lightgreen", "set preferences");
20 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
21 <?php block("black", "preferences"); ?>
25 <th align="left">Exercise Name:</th> <th><input type="text" name="exname" value="<?php echo $PREFS['exname'] ?>"></th>
29 <th align="left">Group Name:</th> <th><input type="text" name="groupname" value="<?php echo $PREFS['groupname'] ?>"></th>
33 <th></th><th align="right"><input type="submit" name="submit" value="Set"></th>