Re: table not showing in explorer

From: Bruce Young <hbrucey(at)yahoo(dot)com>
To: PostgresPHP <pgsql-php(at)postgresql(dot)org>
Subject: Re: table not showing in explorer
Date: 2002-12-26 05:02:55
Message-ID: 20021226050255.99204.qmail@web10406.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

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

In response to

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Andrew McMillan 2002-12-26 09:50:34 Re: table not showing in explorer
Previous Message Andrew McMillan 2002-12-26 02:59:30 Re: table not showing in explorer