# Save options if they were posted.\r
print "<br /><br />";\r
if(param('save')) {\r
- print "<div class=\"error\">Your options have been saved.</div>";\r
+ my $sql = "update $tbl_options set value=? \r
+ where (name = ?)";\r
+ my $sth = $dbh->prepare($sql);\r
\r
my %save;\r
foreach my $p (@valid) {\r
}\r
\r
foreach my $k (keys %save) {\r
- my $sql = "update $tbl_options set value=? \r
- where (name = ?)";\r
- my $sth = $dbh->prepare($sql);\r
$sth->execute($save{$k}, $k);\r
}\r
+\r
+ # The proxy_host can be empty, so check for that.\r
+ if(!defined($save{'proxy_host'})) {\r
+ $sth->execute('', 'proxy_host');\r
+ }\r
+\r
+ print "<div class=\"error\">Your options have been saved.</div>";\r
}\r
\r
# Now show em\r