用php插入实例

?$conn = @mysql_connect(localhost:3306,test,test);include_once js.class.php;include_once pager.class.php;include_once whxbb.class.php;include_once whxbb_article.class.php;// 以上代码最好全放在一个包含文件中$article = new WHXBB_Article();$result = $artcile-Insert(今日天气, whxbb, 今天北京局部地区有雨);// 如果出错,弹出错误信息并返回上页if (WHXBB::isError($result)) { new WHXBB_Error(错误: . $result-GetMsg() . ( . $result-GetNo . ), 1, WHXBB_ERROR_ALERT + WHXBB_ERROR_RETURN); // 或者如下自定义错误 //new WHXBB_Error(添加失败,请您稍后再试, 1, WHXBB_ERROR_ALERT + WHXBB_ERROR_RETURN);}else{ JS::Alert(添加成功); // 跳到指定页 JS:Goto(add.php);}?
You can leave a response, or trackback from your own site.

Leave a Reply

网站地图xml地图