echo "<script>alert('ok');location.href='/';</script>"; return true; } public function add_wsxf($data) { $db = Zend_Db::factory('pdo_mysql', $this->param); $data = $this->formatPost($data); $data['itype'] = 'wsxf'; $db->query("set names utf8"); $db->insert('v9_dynaform1', $data); echo "<script>alert('ok');location.href='/';</script>"; return true; } } $c = new dynaform(); switch ($_GET['fid']) { case 'ldxx': $c->add_ldxx($_POST); break; case 'tzh': $c->add_tzh($_POST); break; case 'jyxc': $c->add_jyxc($_POST); break; case 'wsxf': $c->add_wsxf($_POST); break; default: break; }