|
EHume -> RE: Multiple Criteria (3/31/2005 17:34:19)
|
Hello, I think I got the code cleaned up...I can save the new code in, but it doesn't work when I publish it to the web? Any help would be greatly apprecitated. I am puzzled... Here is the Code from the First Page with the Form:(Marked in Purple) <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 1</title> </head> <body> <form action="InterpreterQuery.asp" method="post"> <p><label for="language">Language</label> <select size="1" name="language"> <option selected>Select an Option</option> <option value="%">All</option> <option value="Farsi">Farsi</option> <option value="Pashto">Pashto</option> <option value="Somali">Somali</option> <option value="Persian">Persian</option> </select> </p> <p> </p> <p> <label for="medical">Medical</label> <input type="checkbox" value="1" name="medical"> <label for="police">Police</label> <input type="checkbox" value="1" name="police"> <label for="legal">Legal</label> <input type="checkbox" value="1" name="legal"> <label for="social">Social</label> <input type="checkbox" value="1" name="social"></p> <p> <input type="submit" value="Submit" name="B1"> <input type="reset" value="Reset" name="B2"> </p> </form> </form> <p> </p> </body> </html> Here is the code from the second Page. marked in blue <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 1</title> </head> <body> <p> </p> <table width="100%" border="1"> <thead> <tr> <td><b>FirstName</b></td> <td><b>LastName</b></td> <td><b>Address</b></td> <td><b>City</b></td> <td><b>State</b></td> <td><b>ZipCode</b></td> <td><b>HomePhone</b></td> <td><b>CellPhone</b></td> <td><b>ContactDay</b></td> <td><b>ContactNight</b></td> <td><b>ContactAnytime</b></td> <td><b>Consecutive</b></td> <td><b>Simultaneous</b></td> <td><b>Sight</b></td> <td><b>Written</b></td> <td><b>Medical</b></td> <td><b>Legal</b></td> <td><b>Social</b></td> <td><b>Police</b></td> <td><b>Lang</b></td> <td><b>OtherEducation</b></td> <td><b>ID</b></td> </tr> </thead> <tbody> b-WasTableFormat="TRUE" startspan --><!--#include file="_fpclass/fpdblib.inc"--> <% if 0 then %> <SCRIPT Language="JavaScript"> document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>"); </SCRIPT> <% end if %> <% mySQL = "SELECT * FROM InterpreterQuery WHERE Lang LIKE '%::language::%'" If Request.Form("medical") = 1 Then mySQL = mySQL & "AND Medical = 1" End If If Request.Form("police") = 1 Then mySQL = mySQL & "AND Police = 1" End If If Request.Form("legal") = 1 Then mySQL = mySQL & "AND Legal = 1" End IF If Request.Form("social") = 1 Then mySQL = mySQL & "AND Social = 1" End If fp_sQry=mySQL fp_sQry=MySQL fp_sDefault="InterpLang=" fp_sNoRecords="<tr><td colspan=22 align=left width=""100%"">No records returned.</td></tr>" fp_sDataConn="Interpreter" fp_iMaxRecords=256 fp_iCommandType=1 fp_iPageSize=5 fp_fTableFormat=True fp_fMenuFormat=False fp_sMenuChoice="FirstName" fp_sMenuValue="FirstName" fp_sColTypes="&FirstName=202&LastName=202&Address=202&City=202&State=202&ZipCode=202&HomePhone=202&CellPhone=202&ContactDay=11&ContactNight=11&ContactAnytime=11&Consecutive=11&Simultaneous=11&Sight=11&Written=11&Medical=11&Legal=11&Social=11&Police=11&Lang=202&OtherEducation=202&ID=3&" fp_iDisplayCols=22 fp_fCustomQuery=False BOTID=1 fp_iRegion=BOTID %> <!--#include file="_fpclass/fpdbrgn1.inc"--> <tr> <td> <%=FP_FieldVal(fp_rs,"FirstName")%> </td> <td> <%=FP_FieldVal(fp_rs,"LastName")%> </td> <td> <%=FP_FieldVal(fp_rs,"Address")%> </td> <td> <%=FP_FieldVal(fp_rs,"City")%> </td> <td> <%=FP_FieldVal(fp_rs,"State")%> </td> <td> <%=FP_FieldVal(fp_rs,"ZipCode")%> </td> <td> <%=FP_FieldVal(fp_rs,"HomePhone")%> </td> <td> <%=FP_FieldVal(fp_rs,"CellPhone")%> </td> <td> <%=FP_FieldVal(fp_rs,"ContactDay")%> </td> <td> <%=FP_FieldVal(fp_rs,"ContactNight")%> </td> <td> <%=FP_FieldVal(fp_rs,"ContactAnytime")%> </td> <td> <%=FP_FieldVal(fp_rs,"Consecutive")%> </td> <td> <%=FP_FieldVal(fp_rs,"Simultaneous")%> </td> <td> <%=FP_FieldVal(fp_rs,"Sight")%> <td> <%=FP_FieldVal(fp_rs,"Written")%> </td> <td> <%=FP_FieldVal(fp_rs,"Medical")%> </td> <td> <%=FP_FieldVal(fp_rs,"Legal")%> </td> <td> <%=FP_FieldVal(fp_rs,"Social")%> </td> <td> <%=FP_FieldVal(fp_rs,"Police")%> </td> <td> <%=FP_FieldVal(fp_rs,"Lang")%> </td> <td> <%=FP_FieldVal(fp_rs,"OtherEducation")%> </td> <td> <%=FP_FieldVal(fp_rs,"ID")%> </td> </tr> </tbody> </table> <p> </p> </body> </html>
|
|
|
|