user (who says the developer’s life should be easy too :).
Example 2: Parsing and querying
straight, no syntax checking, SQL form interface to the database.
<html>
<title>Query form</title>
<body bgcolor="white">
<form action="do_query.php3" method="POST">
Find all documents in which:<br />
the title contains any of these keywords: (*)
<input type="text" name="title" size="40">i<br />
<br />
was written by any of the following: (check as many as needed)<br />
<input type="checkbox" name="author[]" value="Mark Musone"> Mark Musone
<input type="checkbox" name="author[]" value="Mattias Nilsson"> Mattias Nilsson
<input type="checkbox" name="author[]" value="Rasmus Lerdorf"> Rasmus Lerdorf
<input type="checkbox" name="author[]" value="Tim Perdue"> Tim Perdue
<br /> <br />
was published on or after the year:
<select name="pubyear">
<option value="1999" SELECTED>1999</option>
<option value="2000">2000</option>
<option value="2001">2001</option>
</select>
<br />
<input type="submit" name="submit" value="Submit query">
</form>
(*) <I>Note</I>: You can enter a comma separated list of keywords, e.g.
"mail,imap,logging" will search for full or partial matches to:
<tt>mail OR imap OR logging</tt> in the title of the article.
</body>
</html>