X-Original-To: pgsql-php@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id D6CF1475F26 for ; Wed, 26 Mar 2003 01:58:05 -0500 (EST) Received: from alegro.binertia.com (unknown [216.254.174.62]) by postgresql.org (Postfix) with ESMTP id 0C2B3475EC9 for ; Wed, 26 Mar 2003 01:58:05 -0500 (EST) Received: from nofate.com (unknown [24.112.13.97]) by alegro.binertia.com (Postfix) with ESMTP id 05B73C8249; Wed, 26 Mar 2003 02:05:29 -0500 (EST) Message-ID: <3E814E83.9070108@nofate.com> Date: Wed, 26 Mar 2003 01:53:55 -0500 From: apz User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ahmad Sentri Cc: pgsql-php@postgresql.org Subject: Re: make form list with option select References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-33.6 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,IN_REP_TO,RCVD_IN_NJABL, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_MOZILLA_UA autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200303/43 X-Sequence-Number: 1955 Ahmad Sentri wrote: > this syntax php with postgresql .... > this syntax still wrong / error > in my form doesn't list ... I am assuming that $conn is created somewhere above ok > $query1="select kode_fak, nama_fak from fakultas"; > $query_result1 = pg_query($conn, $query1); > while ($row1 = pg_fetch_array($query_result1)) > { > echo "\n"; > } > > ?> first thing I would think of is how you access $row1 1. prolly you meant $row1["kode_fak"] you should quote your keyname, otherwise php thinks its something special, not a variable, not a string 2. I think its more obvious for compiler if you do it more explicitly: echo "