/[informatika.old]/html/test.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /html/test.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (vendor branch)
Thu Feb 10 13:12:41 2000 UTC (23 years ago) by dpavlin
Branch: MAIN, PLIVA
CVS Tags: R0, HEAD
Branch point for: dbi
Changes since 1.1: +0 -0 lines
početni import


1 <?
2
3 if (! isset($from)) {
4 $from=0;
5 }
6
7 $on_page=10;
8
9 $conn = pg_connect("dbname=informatika user=dpavlin");
10
11 $result = pg_Exec ($conn, "select * from otvoreni limit $on_page,$from");
12
13 echo "<table><tr><th>ime</th><th>prezime</th></tr>";
14
15 for ($k = 0; $k < pg_numrows($result); $k++) {
16 $row=pg_fetch_array($result,$k);
17 print "<tr><td>$row[ime]</td><td>$row[prezime]</td></tr>";
18 }
19
20
21 echo "</table>";
22
23 echo "<pre>Druge stranice: ";
24
25 if ($from >= $on_page) {
26 echo "<a href=$PHP_SELF?from=".($from-$on_page).">----</a>";
27 } else {
28 echo "....";
29 }
30
31 if (pg_numrows($result) >= $on_page) {
32 echo "<a href=$PHP_SELF?from=".($from+$on_page).">++++</a>";
33 } else {
34 echo "....";
35 }
36
37 echo "</pre>";
38 ?>

  ViewVC Help
Powered by ViewVC 1.1.26