Re: table not showing in explorer - Mailing list pgsql-php

From Bruce Young
Subject Re: table not showing in explorer
Date
Msg-id 20021226050255.99204.qmail@web10406.mail.yahoo.com
Whole thread Raw
In response to Re: table not showing in explorer  (Andrew McMillan <andrew@catalyst.net.nz>)
Responses Re: table not showing in explorer
List 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

pgsql-php by date:

Previous
From: Andrew McMillan
Date:
Subject: Re: table not showing in explorer
Next
From: Andrew McMillan
Date:
Subject: Re: table not showing in explorer