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!