dickmeiss Thu Apr 28 14:41:29 2005 EDT
Modified files:
/phpdoc/en/reference/yaz reference.xml
Log:
Update example to use "usmarc" . Do not rely on register_globals.
http://cvs.php.net/diff.php/phpdoc/en/reference/yaz/reference.xml?r1=1.18&r2=1.19&ty=u
Index: phpdoc/en/reference/yaz/reference.xml
diff -u phpdoc/en/reference/yaz/reference.xml:1.18
phpdoc/en/reference/yaz/reference.xml:1.19
--- phpdoc/en/reference/yaz/reference.xml:1.18 Tue Feb 8 14:26:07 2005
+++ phpdoc/en/reference/yaz/reference.xml Thu Apr 28 14:41:26 2005
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.18 $ -->
+<!-- $Revision: 1.19 $ -->
<reference id="ref.yaz">
<title>YAZ Functions</title>
<titleabbrev>YAZ</titleabbrev>
@@ -69,8 +69,10 @@
<programlisting role="php">
<![CDATA[
<?php
+$host=$_REQUEST[host];
+$query=$_REQUEST[query];
$num_hosts = count($host);
-if (empty($term) || count($host) == 0) {
+if (empty($query) || count($host) == 0) {
echo '<form method="get">
<input type="checkbox"
name="host[]" value="bagel.indexdata.dk/gils" />
@@ -83,16 +85,17 @@
Library of Congress
<br />
RPN Query:
- <input type="text" size="30" name="term" />
+ <input type="text" size="30" name="query" />
<input type="submit" name="action" value="Search" />
</form>
';
} else {
- echo 'You searched for ' . htmlspecialchars($term) . '<br />';
+ echo 'You searched for ' . htmlspecialchars($query) . '<br />';
for ($i = 0; $i < $num_hosts; $i++) {
$id[] = yaz_connect($host[$i]);
+ yaz_syntax($id[$i], "usmarc");
yaz_range($id[$i], 1, 10);
- yaz_search($id[$i], "rpn", $term);
+ yaz_search($id[$i], "rpn", $query);
}
yaz_wait();
for ($i = 0; $i < $num_hosts; $i++) {