Home >php教程 >php手册 >php An error occured

php An error occured

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-25 16:53:301734browse

<?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.\n";
        exit;
    }
    $result = pg_query($pgsql_conn, "INSTER INTO topic (man, mail, title, content) VALUES (&#39;$name&#39;, &#39;$mail&#39;, &#39;$title&#39;, &#39;$content&#39;);");
    if (!$result) {
        echo "An error occured.\n";
        exit;
    }
    pg_close($pgsql_conn);
}


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn