From hbrucey@yahoo.com Thu Dec 26 02:31:45 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 0BDA5475A1E for ; Wed, 25 Dec 2002 21:31:45 -0500 (EST) Received: from web10405.mail.yahoo.com (web10405.mail.yahoo.com [216.136.130.97]) by postgresql.org (Postfix) with SMTP id 509BB4758FE for ; Wed, 25 Dec 2002 21:31:44 -0500 (EST) Message-ID: <20021226023148.91850.qmail@web10405.mail.yahoo.com> Received: from [24.233.52.93] by web10405.mail.yahoo.com via HTTP; Wed, 25 Dec 2002 18:31:48 PST Date: Wed, 25 Dec 2002 18:31:48 -0800 (PST) From: Bruce Young Subject: table not showing in explorer To: PostgresPHP MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/55 X-Sequence-Number: 1730 i have a php script that searches a column and prints it out. the table appears fine in mozilla, but dont show in Explorer. if i change the variable in the search script to a literal value, it works fine. i have tried alternatives, and it seems that the problem is in the variable. here is the script: any help appreciated. Code Search
">
Search:


no result"; exit;} printf ("
"); printf (" "); printf (" "); while($myrow = pg_fetch_row($result)) { printf ("" , $myrow[0], $myrow[1], $myrow[2]); } printf ("
IDCollege
%s%s
"); } pg_close($dbconnect); ?> __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com From andrew@catalyst.net.nz Thu Dec 26 02:59:24 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id AD70E475AD7 for ; Wed, 25 Dec 2002 21:59:24 -0500 (EST) Received: from kant.catalyst.net.nz (203-79-74-15.adsl.paradise.net.nz [203.79.74.15]) by postgresql.org (Postfix) with ESMTP id 3DC0A4758FE for ; Wed, 25 Dec 2002 21:59:23 -0500 (EST) Received: from 127.0.0.1 (ident=unknown) by kant.catalyst.net.nz with esmtp (masqmail 0.2.16) id 18ROF8-19a-00; Thu, 26 Dec 2002 15:59:30 +1300 Subject: Re: table not showing in explorer From: Andrew McMillan To: Bruce Young Cc: PostgresPHP In-Reply-To: <20021226023148.91850.qmail@web10405.mail.yahoo.com> References: <20021226023148.91850.qmail@web10405.mail.yahoo.com> Content-Type: text/plain Organization: Message-Id: <1040871569.19185.59.camel@kant.mcmillan.net.nz> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.0 Date: 26 Dec 2002 15:59:30 +1300 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/56 X-Sequence-Number: 1731 On Thu, 2002-12-26 at 15:31, Bruce Young wrote: > i have a php script that searches a column and prints it out. > the table appears fine in mozilla, but dont show in Explorer. > if i change the variable in the search script to a literal value, it > works fine. i have tried alternatives, and it seems that the problem > is in the variable. here is the script: > any help appreciated. If it works in Mozilla but not in IE, your problem will most likely be in the form or the javascript. I recommend you use the phpinfo() function to display all of the PHP variables (and other information) in the page and go from there. When you do that it will probably become obvious exactly what difference there is between the two browsers. The problem will have nothing to do with PostgreSQL, of course. Cheers, Andrew. > > > > Code Search > > > > $dbconnect = pg_connect("dbname=campus user=apache"); > ?> >
>
> bgcolor="green">
> bgcolor="#f6f6f5">
> > "> > > > >
Search:
>
>

> //$code_query = $code; > if($submit) { > > //THIS IS THE PROBLEM I THINK > $qry_get_camp_codes = "select id, id, name from list where name > ~* '$code'"; > $result = pg_exec ($dbconnect, $qry_get_camp_codes); > if (!$result) {printf ("Error\n"); exit;} > if (!pg_numrows($result)) { echo "no > result"; exit;} > printf ("
> "); > printf (" > "); > printf (" bgcolor=\"lightblue\"> > "); > while($myrow = pg_fetch_row($result)) { > > printf ("" > , $myrow[0], $myrow[1], $myrow[2]); > } > printf ("
IDCollege
href=\"javascript:setCampCode('%s')\">%s%s
> "); > } > pg_close($dbconnect); > ?> > > -- --------------------------------------------------------------------- Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267 Survey for nothing with http://survey.net.nz/ --------------------------------------------------------------------- From hbrucey@yahoo.com Thu Dec 26 05:02:54 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1C13D475C85 for ; Thu, 26 Dec 2002 00:02:54 -0500 (EST) Received: from web10406.mail.yahoo.com (web10406.mail.yahoo.com [216.136.130.98]) by postgresql.org (Postfix) with SMTP id 1FEF4475AEC for ; Thu, 26 Dec 2002 00:02:50 -0500 (EST) Message-ID: <20021226050255.99204.qmail@web10406.mail.yahoo.com> Received: from [24.233.52.93] by web10406.mail.yahoo.com via HTTP; Wed, 25 Dec 2002 21:02:55 PST Date: Wed, 25 Dec 2002 21:02:55 -0800 (PST) From: Bruce Young Subject: Re: table not showing in explorer To: PostgresPHP In-Reply-To: <1040871569.19185.59.camel@kant.mcmillan.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/57 X-Sequence-Number: 1732 Still wont work. did a few tests and it seems like Explorer wont print the table when i use a form variable. the script will notify if there are no results, but nothing if any. - no table oh, and what info in phpinfo() would i need to look at if its the prob.? thanks ===================================== Code Search
">
Search:


no result"; exit;} print "
"; print ""; print ""; while($myrow = pg_fetch_row($result)) { printf ("" , $myrow[0], $myrow[1]); } printf ("
IDNAME
%s%s
"); } pg_close($dbconnect); ?> __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com From andrew@catalyst.net.nz Thu Dec 26 09:50:32 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 0811947590C for ; Thu, 26 Dec 2002 04:50:32 -0500 (EST) Received: from kant.catalyst.net.nz (203-79-74-15.adsl.paradise.net.nz [203.79.74.15]) by postgresql.org (Postfix) with ESMTP id F068A4758FE for ; Thu, 26 Dec 2002 04:50:29 -0500 (EST) Received: from 127.0.0.1 (ident=unknown) by kant.catalyst.net.nz with esmtp (masqmail 0.2.16) id 18RUex-288-00; Thu, 26 Dec 2002 22:50:35 +1300 Subject: Re: table not showing in explorer From: Andrew McMillan To: Bruce Young Cc: PostgresPHP In-Reply-To: <20021226050255.99204.qmail@web10406.mail.yahoo.com> References: <20021226050255.99204.qmail@web10406.mail.yahoo.com> Content-Type: text/plain Organization: Message-Id: <1040896234.19185.71.camel@kant.mcmillan.net.nz> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.0 Date: 26 Dec 2002 22:50:34 +1300 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/58 X-Sequence-Number: 1733 On Thu, 2002-12-26 at 18:02, Bruce Young wrote: > Still wont work. did a few tests and it seems like Explorer wont print the > table when i use a form variable. the script will notify if there are no > results, but nothing if any. - no table > oh, and what info in phpinfo() would i need to look at if its the prob.? >From your code, it looks like the table won't be printed if $submit is not set (although your code is perhaps weak on checking the value of that variable). I have seen cases where IE will set the value of a submit button variable differently if you hit within the form, than if you click on the button with your mouse. Remember, your comments accusation of "does/doesn't work in IE" is not actually true - all of this code runs on the _server_ - not the client. All that IE or Mozilla does is provide values for variables input to the script: the script runs on the same server in both cases. In any case in the phpinfo() I would look for differences in the value of the "submit" variable. Obviously differences in the value of the "code" variable would have an effect as well, but are possibly less likely. You may want to lose the javascript too, to simplify debugging. That stuff _does_ run on the client, so may behave differently on Mozilla and IE. Personally I avoid DHTML like the plague (because it is so prone to browser-specific problems) and so I don't know what your fragment is supposed to achieve. Cheers, Andrew. > thanks > > ===================================== > > Code Search > > >
> > bgcolor="lightblue"> > "> > > >
Search:
>
>

> $dbconnect = pg_connect("dbname=campus user=apache"); > //$code_query = $code; > $code = strtolower($code); > if($submit) { You could change that to: if ( "$code" != "" ) { > if($code=="") {print "You need to enter a query!"; exit;} > > //WORKS in Explorer > $qry_get_camp_codes = "select id,name from campuslist where name ilike > lower('%HOUSTon%')"; > //DONT WORK in Explorer > //$qry_get_camp_codes = "select id,name from campuslist where name ilike > lower('%$code%')"; > $result = pg_query ($dbconnect, $qry_get_camp_codes); > if (!$result) {printf ("Error\n"); exit;} > if (!pg_numrows($result)) { echo "no > result"; exit;} > print "
"; > print ""; > print ""; > while($myrow = pg_fetch_row($result)) { > printf ("" > , $myrow[0], $myrow[1]); > } > printf ("
IDNAME
%s%s
> "); > } > pg_close($dbconnect); > ?> > > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > http://mailplus.yahoo.com > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster -- --------------------------------------------------------------------- Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267 Survey for nothing with http://survey.net.nz/ ---------------------------------------------------------------------