Error - when trying to connect to postgresql
| From: | Paul Tun | Date: | Mon, 21 Jul 2003 00:42:02 +0000 |
| Subject: | Error - when trying to connect to postgresql | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-156000@lists.php.net to get a copy of this message | ||
When I try to connect to postresql with my php script below I got hhis eror:
I can insert into the table from psql. Please help
Thanks,
-----------------------------------------------------------------------------------------------------------
Warning: pg_exec() query failed: ERROR: invention: permission denied in
/home/pptun/public_html/invention.php on line 9
-----------------------------------------------------------------------------------------------------------
Here is my PHP script:
<?PHP
$L_Invention = addslashes($Invention);
$L_Inventor = addslashes($Inventor);
$L_Year = addslashes($Year);
//note: Nation is a code with integer value
$L_Nation = addslashes($Nation);
$conn = pg_connect("dbname=pptun port=5432");
$result = pg_exec($conn, "insert into invention
values('$L_Invention','$L_Inventor','$L_Year',$L_Nation);");
//header("Location:http://is3.usfca.edu/~pptun/invention.html");
exit;
?>
---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!