php An error occured
来源:程序员人生 发布时间:2014-01-20 11:21:53 阅读次数:2223次
- <?php
- function install_postgresql($name, $mail, $title, $content){
-
- $pgsql_conn = pg_connect("host=localhost port=5432 dbname=book user=vi");
- if (!$pgsql_conn) {
- echo "connect database error.";
- exit;
- }
-
- $result = pg_query($pgsql_conn, "INSTER INTO topic (man, mail, title, content) VALUES ('$name', '$mail', '$title', '$content');");
- if(!$result){
- echo "An error occured.";
- exit;
- }
-
- pg_close($pgsql_conn);
- }
- ?>
生活不易,码农辛苦
如果您觉得本网站对您的学习有所帮助,可以手机扫描二维码进行捐赠