1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?php $dir = "."; include_once($dir."/_common.php");
foreach($_POST as $key=>$post_val){ if(substr($key,0,5)=='otms_'){ $sql = "select count(*) as cnt from options where optname = '{$key}' "; $info = sql_fetch($sql,$connect_om); if($info['cnt']>0){ $sql = "update options set optvalue = '{$post_val}' where optname = '{$key}' "; } else { $sql = "insert into options set optvalue = '{$post_val}', optname = '{$key}' "; } mysql_query($sql,$connect_om); } }
?> <script> document.location.href='base_config.php'; </script>
|