pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew McMillan <andrew@catalyst.net.nz>
To: Bruce Young <hbrucey@yahoo.com>
Cc: PostgresPHP <pgsql-php@postgresql.org>
Subject: Re: table not showing in explorer
Date: 26 Dec 2002 15:59:30 +1300
Message-ID: <1040871569.19185.59.camel@kant.mcmillan.net.nz> (raw)
In-Reply-To: <20021226023148.91850.qmail@web10405.mail.yahoo.com>
References: <20021226023148.91850.qmail@web10405.mail.yahoo.com>

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.
> 
> 
> <html lang="en">
> <head> <title>Code Search</title>
> <script TYPE="text/javascript" LANGUAGE="JavaScript"><!--
> function setCampCode(code) {
>     opener.campcode = code;
>     opener.restart();
>     self.close;
> }
> //--></SCRIPT>
> </head>
> <body BGCOLOR="white">
> <?php //Database Connection - global
>   $dbconnect = pg_connect("dbname=campus user=apache");
> ?>
> <br>
> <center>
> <table width="90%" border="0" cellspacing="1" cellpadding="0"
> bgcolor="green"><tbody><tr><td>
> <table width="100%" border="0" cellspacing="1" cellpadding="8"
> bgcolor="#f6f6f5"><tbody><tr><td>
> <table width="70%" border=0 cellpadding=0 cellspacing=4>
> <form name="campcode" method="post" action="<?php
> print("$PHP_SELF");?>">
> 
> <tr><td>Search:</td><td><input type="text" name="code"></td>
> <td><input type="submit" name="submit" value="Search"></td></tr>
> </form></table>
> </td></tr></tbody></table></td></tr></tbody></table> </center>
> <br><br>
> <?php
>     //$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 "<font color=\"red\" size=4>no
> result</font>"; exit;}
>     printf ("<center>
>     ");
>     printf ("<table cellpadding=4 cellspacing=1 border=1>
> 	");
> 	printf ("<tr
> bgcolor=\"lightblue\"><td><b>ID</b></td><td><b>College</b></td></tr>
> 	");
>     while($myrow = pg_fetch_row($result)) {
> 
> 	printf ("<tr><td><a
> href=\"javascript:setCampCode('%s')\">%s</a></td><td>%s</td></tr>"
>     , $myrow[0], $myrow[1], $myrow[2]);
>     }
>     printf ("</table></center>
>     ");
>     }
> pg_close($dbconnect);
> ?>
> </body>
> </html>

-- 
---------------------------------------------------------------------
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/ 
---------------------------------------------------------------------




view thread (4+ messages)  latest in thread

Message-ID: <1040871569.19185.59.camel@kant.mcmillan.net.nz>
Permalink:  ../1040871569.19185.59.camel@kant.mcmillan.net.nz/
Also on:    postgresql.org/message-id/1040871569.19185.59.camel@kant.mcmillan.net.nz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: andrew@catalyst.net.nz, hbrucey@yahoo.com
  Subject: Re: table not showing in explorer
  In-Reply-To: <1040871569.19185.59.camel@kant.mcmillan.net.nz>
  References: <20021226023148.91850.qmail@web10405.mail.yahoo.com> <1040871569.19185.59.camel@kant.mcmillan.net.nz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox