Home | Features | FAQ | Support | Contact Us




Features

FAQ

Documentation

Demo

Support

Download

Purchase

Web Hosting

Clients

FoxWeb Forum

Full-Text Search





Name Search Sample Application

The Name Search sample application illustrates how simple it is to write FoxWeb applications. All the code and HTML content is included in a single file.

Source Code

<html>
<head>
<title>Name Search</title>
</head>
<body>
<h3>Search Criteria:</h3>

<p>This example illustrates how simple it is to write FoxWeb
applications. The code searches a FoxPro table for matches on the
name entered by the user. Partial matches also yield results. For
Example "mo" will find both "Monroe" and "Morrison." The search is
not case sensitive. To see all the names in the database just leave
the Name entry blank.</p>

<form action="NameSearch.fwx" method="post">
Name:
<input name="name" maxlength="30" value="<%=Request.Form("name")%>">
<input type="submit" value="Search">
</form>
<hr>
<%
IF Request.FormCount("name") <> 0
    SET EXACT OFF && So that partial names will work
    SELECT * FROM Names;
        WHERE UPPER(name) = UPPER(Request.Form("name"));
        ORDER BY name INTO CURSOR results

    * Check if there were any hits
    IF _TALLY > 0
        %>
<h3>Search Results:</h3><%
        SCAN
            Response.Write(results.name + "<br>")
        ENDSCAN
    ELSE
        %>
<h3>Your Search Yielded No Results</h3><%
    ENDIF
ENDIF
%>

</body>
</html>


© Copyright Aegis Group