3 include_once('config.php');
\r
5 if(isset($_REQUEST['formaction']) && $_REQUEST['formaction']=='saveoptions')
\r
7 $db=new PDO('sqlite:'.$dblocation);
\r
8 $st=$db->prepare("UPDATE tblOption SET OptionValue=? WHERE Option=?;");
\r
9 foreach($_REQUEST as $key=>$val)
\r
11 $st->bindParam(1,$val);
\r
12 $st->bindParam(2,$key);
\r
20 $db=new PDO('sqlite:'.$dblocation);
\r
22 $rs=$db->query("SELECT Option, OptionValue, OptionDescription FROM tblOption;");
\r
25 <h2 style="text-align:center;">Options</h2>
\r
26 <form name="frmoptions" method="post">
\r
27 <input type="hidden" name="formaction" value="saveoptions">
\r
32 <th>Description</th>
\r
35 while($record=$rs->fetch())
\r
38 print '<td valign="TOP">'.$record[0].'</td>';
\r
39 print '<td valign="TOP"><input type="text" name="'.$record[0].'" value="'.$record[1].'"></td>';
\r
40 print '<td valign="TOP">'.$record[2].'</td>';
\r
47 <input type="submit" value="Save">
\r
55 include_once('linkbar.php');
\r
56 include_once('template.php');
\r