Update example to use "usmarc" . Do not rely on register_globals.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@185391 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Adam Dickmeiss 2005-04-28 18:41:26 +00:00
parent cfb04bdbdc
commit 0a51e2d887

View file

@ -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 @@ if (empty($term) || count($host) == 0) {
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++) {