table not showing in explorer

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

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.

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

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

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Andrew McMillan 2002-12-26 02:59:30 Re: table not showing in explorer
Previous Message Jules Alberts 2002-12-24 12:57:24 AdoDB: how to determine OID of inserted row with Execute()