php insert problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



<snip>

 $database = pg_connect ("host=localhost dbname=rbak user=nobody") or die("database connection failed");
  $result = pg_exec ($database, "INSERT into employees (emp_name, emp_email) VALUES ('$emp_name','$emp_email')";

  if (!$result) {
        echo "query died\n";
        exit;
  }

</snip>

the above code produces a parse error.  "parse error, unexpected ';' in blah.php on line X"

line X is the $result = pg_exec ($database, "INSERT into employees (emp_name, emp_email) VALUES ('$emp_name','$emp_email')"; line.  I've started at this long enough, and it's time for other eyes to look.  any ideas?  similar SELECT queries work just fine.

dan


[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux