pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Young <hbrucey@yahoo.com>
To: PostgresPHP <pgsql-php@postgresql.org>
Subject: Re: table not showing in explorer
Date: Wed, 25 Dec 2002 21:02:55 -0800 (PST)
Message-ID: <20021226050255.99204.qmail@web10406.mail.yahoo.com> (raw)
In-Reply-To: <1040871569.19185.59.camel@kant.mcmillan.net.nz>

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

=====================================
<html lang="en">
<head> <title>Code Search</title>
</head>
<body>
<center>

<table width="90%" border="0" cellspacing="1" cellpadding="0"
bgcolor="lightblue">
<form name="campcode" method="post" action="<?php print("$PHP_SELF");?>">
<tr height=30><td>Search:</td><td><input type="text" name="code"></td>
<td><input type="submit" name="submit" value="Search"></td></tr>
</form></table>
 </center>
<br><br>
<?php
    $dbconnect = pg_connect("dbname=campus user=apache");
    //$code_query = $code;
    $code = strtolower($code);
    if($submit) {
      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 "<font color=\"red\" size=4>no
result</font>"; exit;}
    print "<center>";
    print "<table border=1>";
	print "<tr><td>ID</td><td>NAME</td></tr>";
    while($myrow = pg_fetch_row($result)) {
	printf ("<tr><td>%s</td><td>%s</td></tr>"
    , $myrow[0], $myrow[1]);
    }
    printf ("</table></center>
    ");
    }
pg_close($dbconnect);
?>
</body>
</html>

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



view thread (4+ messages)  latest in thread

Message-ID: <20021226050255.99204.qmail@web10406.mail.yahoo.com>
Permalink:  ../20021226050255.99204.qmail@web10406.mail.yahoo.com/
Also on:    postgresql.org/message-id/20021226050255.99204.qmail@web10406.mail.yahoo.com

 · 

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: hbrucey@yahoo.com
  Subject: Re: table not showing in explorer
  In-Reply-To: <20021226050255.99204.qmail@web10406.mail.yahoo.com>
  References: <1040871569.19185.59.camel@kant.mcmillan.net.nz> <20021226050255.99204.qmail@web10406.mail.yahoo.com>

* 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