Results 1 to 2 of 2

Thread: Search form

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    40

    Cool

    Dear fellow members,

    I am a beginner in vb as well as databases. Here is my problem. I need to create a db search on my website. One to contain a command button and a text box. The text box should be the input field for a zipcode and the command button initiates the search. A new page would return a field that is associated with the zipcode.
    -----------------------------------------------------------
    Here is my code for the first page:
    ------------------------------------
    <%@ LANGUAGE="VBSCRIPT" %>
    <HTML><HEAD>
    </HEAD>
    <BODY>
    <P>Simply enter your zip code, and our locator system will find the name(s) of
    the city.</P>
    <P>
    <FORM action=test.asp method=get>&nbsp;
    <P><B>Enter a Zip-Code: </B><INPUT name=zip> <INPUT type=submit value="look it up"> </FORM>
    <BLOCKQUOTE></BLOCKQUOTE></TD><TD width="14" valign="top"><IMG height=1 src=""
    width=14> </TD></TR><TD colspan="4">&nbsp;
    <HR noShade SIZE=1>
    </BODY></HTML>
    -----------------------------------------------------------

    The second page: (test.asp)
    --------------------------------
    <%@ LANGUAGE="VBSCRIPT" %>
    <HTML>
    <HEAD>
    <TITLE>Test</TITLE>
    </HEAD>
    <BODY>
    <% dim zip
    %>
    <%
    IF zip="39110" THEN
    Response.Write ("Madison Branch")
    ELSE
    Response.Write ("Not madison")
    END IF
    Response.Write ("Madison Branch")
    %>
    </BODY>
    </HTML>

    -----------------------------------------------------------

    My If statement isn't working!!!
    All I get is =>

    Not madisonMadison Branch

    on the page. I appreciate all help from experienced asp gurus.

    Thanks,

    SG



  2. #2

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    40

    Red face help!

    Seems like im getting a 0 all the time for zip?????
    my entry form is not accepting the value as zip?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width