JTapp Posted April 14, 2008 Share Posted April 14, 2008 Or so it would seem.. I'm just too new to know... I have to change my search form that has a multiple option metode drop down box to - no drop down/no need to select the item/one option only search field where the user types in the value.. can you recommend how to change my code? It seems I have to rename "option value"...? <select name="metode" size="5"> <option value="TableName.FieldName">Client City</option> </select> Quote Link to comment Share on other sites More sharing options...
Northern Flame Posted April 14, 2008 Share Posted April 14, 2008 this should be in the html section, but anyways, try this: <input type="hidden" name="metode" value="TableName.FieldName" /> Quote Link to comment Share on other sites More sharing options...
JTapp Posted April 14, 2008 Author Share Posted April 14, 2008 It worked but I have a new problem... I'm thinking there is no way that change created the problem but I thought I would ask. I swear last night I had both forms working!!! Basically, the code below (as immature as it may be- given I'm a beginner) has two search forms. This morning the first form - pointing to 3results.php just stopped working... any thoughts? <form method="post" action="http://www.glflamason.org/NEWSITE/NEW2/lodgelocator/3results.php"; target="_blank"> <p class="style1"> </p> <p class="style1"><img src="ldgePhotos/lodgelocator.gif" alt="LodgeLocator" width="370" height="53"></p> <p class="style1"> </p> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td width="544" height="183"> <p align="center"> <select name="metode" size="6"> <option value="tblLodges.strLodgeName" selected>Name of Lodge</option> <option value="tblLodges.intLodgeNumber">Lodge Number</option> <option value="tblLodges.intDistrictID">District Lodge Is In</option> <option value="tblLodges.strLodgeMailingCity">City Lodge Is Located In</option> <option value="tblLodges.strLodgeMailingPostCode">Zip Code of Lodge Location</option> <option value="tblLodges.strLodgeCounty">Lodge Parish</option> </select> <span class="style9">Search Value:</span> <input name="search2" type="text" class="form" size="25"> </p> <p align="center"> </p> <div align="center"> <input type="submit" value="Click Here To Search Our Lodge Locator!!" name="GOTWO"> </p> </div></td> </tr> </table> <hr> </form></td> <p> </p> <table class="auto" width="811"> <tr> <td width="803" height="510" class="row2"> <table width="79%" height="58%"> <tr> <td height="245" bgcolor="#E9E7D8" valign="top"> <table cellpadding="0" cellspacing="0" border="2" style=" height:25%;" height="57%" width="102%"> <tr valign="top" bgcolor="#E9E7D8"> <td height="194" align="center" valign="middle" bordercolor="#666633"> <form method="post" action="http://www.glflamason.org/NEWSITE/NEW2/lodgelocator/5results.php"; target="_blank"> <p class="style1"><img src="ldgePhotos/districtdetails.gif" alt="distdetails" width="370" height="53"></p> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td bordercolor="#000000"> <p> </p> <p align="center"> <input type="hidden" name="metode" value="tblLodges.intDistrictID"/> </select> <p> </p> <p align="center"<span class="style9">Enter District Number:</span> <input name="search" type="text" class="form" size="5"> </p> <div align="center"> <input type="submit" value="Click Here To View District Details" name="Go"> </p> <p align="center"> </p></td> </tr> </table> </form></td> Quote Link to comment Share on other sites More sharing options...
Zhadus Posted April 14, 2008 Share Posted April 14, 2008 When you input the code that Northern Flame gave you, you neglected to remove the trailing "</select>." Remove that and I'd imagine it'll clear up for you. Quote Link to comment Share on other sites More sharing options...
JTapp Posted April 14, 2008 Author Share Posted April 14, 2008 I tried removing the "select", but both forms still won't work....only the bottom one will... Quote Link to comment Share on other sites More sharing options...
Zhadus Posted April 14, 2008 Share Posted April 14, 2008 In addition to that </select> there is also this bit of code: <p align="center"<span class="style9">Enter District Number:</span> <input name="search" type="text" class="form" size="5"> Make sure you close that first paragraph after the alignment. If that still doesn't work, post refreshed code, please put it in "CODE" quotation. Also include some test data. Quote Link to comment Share on other sites More sharing options...
JTapp Posted April 14, 2008 Author Share Posted April 14, 2008 OK - Test Data is located at: http://www.glflamason.org/NEWSITE/NEW2/lodgelocator/5search.php The bottom form is the only one that is currently working. To see it working -- use "District" 6. Here is the code for 5search.php: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <!-- DW6 --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Grand Lodge of Florida </title> <link href="../style.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- .style2 {color: #E0DEBF} body { background-color: #E1E3C0; } .style9 { font-size: 16px; font-weight: bold; } --> </style> </head> <body id="page1"> <table width="128%" style="height:672px;" height="505"> <tr> <td height="1161"> <table id="main" align="center" width="817" height="909"> <tr bgcolor="#FFFF99"> <td width="809" height="147" bgcolor="#FFFF99"><img src="../Images/header2.png" width="766" height="128"> <!--Valid flash version 8.0--> </td> </tr> <tr> <td id="content" height="754"> <!--|**START IMENUS**|imenus0,inline--><div id="dreamweaver_design_view_show" style="display:none;width:762px;height:23px;">Infinite Menus Place Holder (Dreamweaver Design View)</div><div id="dreamweaver_design_view_hide"> <!-- ****** Infinite Menus Core CSS [Do Not Modify!] ****** --> <style type="text/css">.imcm ul,.imcm li,.imcm div,.imcm span,.imcm a{text-align:left;vertical-align:top;padding:0px;margin:0;list-style:none outside none;border-style:none;background-image:none;clear:none;float:none;display:block;position:static;overflow:visible;line-height:normal;}.imcm li a img{display:inline;border-width:0px;}.imcm span{display:inline;}.imcm .imclear,.imclear{clear:both;height:0px;visibility:hidden;line-height:0px;font-size:1px;}.imcm .imsc{position:relative;}.imcm .imsubc{position:absolute;visibility:hidden;}.imcm ul ul{position:relative;}.imcm li{list-style:none;font-size:1px;float:left;}.imcm ul ul li{width:100%;float:none !important;}.imcm a{display:block;position:relative;}.imcm ul .imsc,.imcm ul .imsubc {z-index:10;}.imcm ul ul .imsc,.imcm ul ul .imsubc{z-index:20;}.imcm ul ul ul .imsc,.imcm ul ul ul .imsubc{z-index:30;}.imde ul li:hover .imsubc{visibility:visible;}.imde ul ul li:hover .imsubc{visibility:visible;}.imde ul ul ul li:hover .imsubc{visibility:visible;}.imde li:hover ul .imsubc{visibility:hidden;}.imde li:hover ul ul .imsubc{visibility:hidden;}.imde li:hover ul ul ul .imsubc{visibility:hidden;}.imcm .imea{display:block;position:relative;left:0px;font-size:1px;line-height:1px;height:0px;width:1px;float:right;}.imcm .imea span{display:block;position:relative;font-size:1px;line-height:0px;}.dvs,.dvm{border-width:0px}/*\*//*/.imcm .imea{visibility:hidden;}/**/</style><!--[if IE]><style type="text/css">.imcm .imea span{position:absolute;}.imcm .imclear,.imclear{display:none;}.imcm{zoom:1;} .imcm li{curosr:hand;} .imcm ul{zoom:1}.imcm a{zoom:1;}</style><![endif]--><!--[if gte IE 7]><style type="text/css">.imcm .imsubc{background-image:url(ie_css_fix);}</style><![endif]--> <style type="text/css"> /* --[[ Main Expand Icons ]]-- */ #imenus0 .imeam span,#imenus0 .imeamj span {background-image:url(../Images/sample1_main_arrow.gif); width:15px; height:14px; left:-15px; top:0px; background-repeat:no-repeat;background-position:top left;} #imenus0 li:hover .imeam span,#imenus0 li a.iactive .imeamj span {background-image:url(../Images/sample1_main_arrow.gif); background-repeat:no-repeat;background-position:top left;} /* --[[ Sub Expand Icons ]]-- */ #imenus0 ul .imeas span,#imenus0 ul .imeasj span {background-image:url(../Images/sample1_sub_arrow.gif); width:14px; height:14px; left:-14px; top:0px; background-repeat:no-repeat;background-position:top left;} #imenus0 ul li:hover .imeas span,#imenus0 ul li a.iactive .imeasj span {background-image:url(../Images/sample1_sub_arrow.gif); background-repeat:no-repeat;background-position:top left;} /* --[[ Main Container ]]-- */ #imouter0 {background-color:#e6ede7; border-style:solid; border-color:#518145; border-width:1px; padding:0px; } /* --[[ Sub Container ]]-- */ #imenus0 li ul {background-color:#e6ede7; border-style:solid; border-color:#546642; border-width:6px; padding:5px; } /* --[[ Main Items ]]-- */ #imenus0 li a, #imenus0 .imctitle {color:#333333; text-align:center; font-family:MicrosoftSansSerif; font-size:14px; font-weight:bold; font-style:normal; text-decoration:none; border-style:none; border-color:#000000; border-width:0px; padding:2px 5px; } /* [hover] - These settings must be duplicated for IE compatibility.*/ #imenus0 li:hover>a {background-color:#546642; color:#cfcfcf; } #imenus0 li a.ihover, .imde imenus0 a:hover {background-color:#546642; color:#cfcfcf; } /* [active] */ #imenus0 li a.iactive {} /* --[[ Sub Items ]]-- */ #imenus0 ul a, #imenus0 .imsubc li .imctitle {color:#111111; text-align:left; font-family:MSSansSerif; font-size:14px; font-weight:bold; font-style:normal; text-decoration:none; border-style:none; border-color:#000000; border-width:1px; padding:2px 5px; } /* [hover] - These settings must be duplicated for IE comptatibility.*/ #imenus0 ul li:hover>a {background-color:#546642; color:#cfcfcf; } #imenus0 ul li a.ihover {background-color:#546642; color:#cfcfcf; } /* [active] */ #imenus0 ul li a.iactive {text-decoration:underline; } </style> <!-- ****** Infinite Menus Structure & Links ***** --> <div class="imrcmain0 imgl" style="width:762px;z-index:999999;position:relative;"><div class="imcm imde" id="imouter0"><ul id="imenus0"> <li class="imatm" style="width:105px;"><a href="#">Home</a></li> <li class="imatm" style="width:191px;"><a class="" href="#"><span class="imea imeam"><span></span></span>Grand Lodge</a> <div class="imsc"><div class="imsubc" style="width:213px;top:0px;left:1px;"><ul style=""> <li><a href="#"><span class="imea imeas"><span></span></span>Awards and Programs</a> <div class="imsc"><div class="imsubc" style="width:174px;top:-21px;left:184px;"><ul style=""> <li><a href="#">Achievement Award</a></li> <li><a href="#">Child ID Program</a></li> <li><a href="#">FA-100 Program</a></li> <li><a href="#">MH - 100 Program</a></li> <li><a href="#">Perpetual Membership</a></li> <li><a href="#">Scholarship Essay</a></li> </ul></div></div></li> <li><a class="" href="#"><span class="imea imeas"><span></span></span>Charities</a> <div class="imsc"><div class="imsubc" style="width:146px;top:-21px;left:185px;"><ul style=""> <li><a href="#">Masonic Research Laboratory</a></li> <li><a href="#">Planned Giving</a></li> </ul></div></div></li> <li><a href="#">City of Jacksonville</a></li> <li><a href="#"><span class="imea imeas"><span></span></span>Contact Information</a> <div class="imsc"><div class="imsubc" style="width:135px;top:-21px;left:190px;"><ul style=""> <li><a href="#">Contact Us</a></li> <li><a href="#">Districts</a></li> <li><a href="#">Information Request Form</a></li> <li><a href="#">Office Personnel</a></li> </ul></div></div></li> <li><a href="#"><span class="imea imeas"><span></span></span>Ever Consider Joining?</a> <div class="imsc"><div class="imsubc" style="width:258px;top:-21px;left:186px;"><ul style=""> <li><a href="#">Considering Becoming A Mason?</a></li> <li><a href="#">Famous Masons</a></li> <li><a href="#">What is Freemasonry?</a></li> <li><a href="#">When is a Man a Mason?</a></li> <li><a href="#">Why I Joined</a></li> </ul></div></div></li> <li><a href="#"><span class="imea imeas"><span></span></span>Florida Mason Magazine</a> <div class="imsc"><div class="imsubc" style="width:171px;top:-21px;left:183px;"><ul style=""> <li><a href="#">About the Magazine</a></li> <li><a href="#">Suggestions for Masonic Articles</a></li> <li><a href="#">Writing Guidelines</a></li> </ul></div></div></li> <li><a href="#">Florida Masonic Home</a></li> <li><a href="#"><span class="imea imeas"><span></span></span>Grand Lodge Officers</a> <div class="imsc"><div class="imsubc" style="width:227px;top:-21px;left:191px;"><ul style=""> <li><a href="#">Lodge Officers</a></li> <li><a href="#">Letter from Our Grand Master</a></li> <li><a href="#">Calendars</a></li> <li><a href="#">Grand Communication</a></li> </ul></div></div></li> <li><a href="#">Guest Book</a></li> <li><a href="#"><span class="imea imeas"><span></span></span>History</a> <div class="imsc"><div class="imsubc" style="width:169px;top:-21px;left:188px;"><ul style=""> <li><a href="#">Historical Overview</a></li> <li><a href="#">Past Officers</a></li> </ul></div></div></li> <li><a href="#"><span class="imea imeas"><span></span></span>Other Links</a> <div class="imsc"><div class="imsubc" style="width:191px;top:-21px;left:191px;"><ul style=""> <li><a href="#">Shrine</a></li> <li><a href="#">York Rite</a></li> </ul></div></div></li> <li><a href="#">Photo Gallery</a></li> </ul></div></div></li> <li class="imatm" style="width:124px;"><a href="#">Lodge Locator</a></li> <li class="imatm" style="width:168px;"><a href="#"><span class="imea imeam"><span></span></span>Grand Secretary</a> <div class="imsc"><div class="imsubc" style="width:168px;top:0px;left:0px;"><ul style=""> <li><a href="#">Overview</a></li> <li><a href="#"><span class="imea imeas"><span></span></span>Book Store</a> <div class="imsc"><div class="imsubc" style="width:143px;top:-21px;left:146px;"><ul style=""> <li><a href="#">Registration for Supplies</a></li> <li><a href="#">No-Cost Supplies Order Form</a></li> </ul></div></div></li> <li><a href="#">Florida Annual Directory</a></li> <li><a href="#">Reporting Forms</a></li> </ul></div></div></li> <li class="imatm" style="width:172px;"><a href="#"><span class="imea imeam"><span></span></span>Masonic Education </a> <div class="imsc"><div class="imsubc" style="width:173px;top:;left:;"><ul style=""> <li><a href="#">John the Baptist</a></li> <li><a href="#">John the Evangelist</a></li> <li><a href="#">Masonic Glossary</a></li> <li><a href="#"><span class="imea imeas"><span></span></span>Masonic Education</a> <div class="imsc"><div class="imsubc" style="width:159px;top:-21px;left:140px;"><ul style=""> <li><a href="#">Master Mason Quiz</a></li> <li><a href="#">Lodge Officers Training Course</a></li> <li><a href="#">Comment Form</a></li> </ul></div></div></li> </ul></div></div></li> </ul><div class="imclear"> </div></div></div> <!--[imcode]*** Infinite Menus Settings / Code - This script reference must appear last. *** *Note: This script is required for scripted add on support and IE 6 sub menu functionality. *Note: This menu will fully function in all CSS2 browsers with the script removed.--> <script language="JavaScript" src="../ocscript.js" type="text/javascript"></script> </div><!--|**END IMENUS**|--> <table class="auto" width="811"> <tr> <td width="803" height="510" class="row2"> <table width="79%" height="58%"> <tr> <td height="345" bgcolor="#E9E7D8" valign="top"> <table cellpadding="0" cellspacing="0" border="5" style=" height:25%;" height="105%" width="102%"> <tr valign="top" bordercolor="#660000" bgcolor="#E9E7D8"> <td height="234" align="center" valign="middle" bordercolor="#666633"> <form method="post" action="http://www.glflamason.org/NEWSITE/NEW2/lodgelocator/3results.php"; target="_blank"> <p class="style1"> </p> <p class="style1"><img src="ldgePhotos/lodgelocator.gif" alt="LodgeLocator" width="370" height="53"></p> <p class="style1"> </p> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td width="544" height="183"> <p align="center"> <select name="metode" size="6"> <option value="tblLodges.strLodgeName" selected>Name of Lodge</option> <option value="tblLodges.intLodgeNumber">Lodge Number</option> <option value="tblLodges.intDistrictID">District Lodge Is In</option> <option value="tblLodges.strLodgeMailingCity">City Lodge Is Located In</option> <option value="tblLodges.strLodgeMailingPostCode">Zip Code of Lodge Location</option> <option value="tblLodges.strLodgeCounty">Lodge Parish</option> </select> <span class="style9">Search Value:</span> <input name="search2" type="text" class="form" size="25"> </p> <p align="center"> </p> <div align="center"> <input type="submit" value="Click Here To Search Our Lodge Locator!!" name="GOTWO"> </p> </div></td> </tr> </table> <hr> </form></td> <p> </p> <table class="auto" width="811"> <tr> <td width="803" height="510" class="row2"> <table width="79%" height="58%"> <tr> <td height="245" bgcolor="#E9E7D8" valign="top"> <table cellpadding="0" cellspacing="0" border="2" style=" height:25%;" height="57%" width="102%"> <tr valign="top" bgcolor="#E9E7D8"> <td height="194" align="center" valign="middle" bordercolor="#666633"> <form method="post" action="http://www.glflamason.org/NEWSITE/NEW2/lodgelocator/5results.php"; target="_blank"> <p class="style1"><img src="ldgePhotos/districtdetails.gif" alt="distdetails" width="370" height="53"></p> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td bordercolor="#000000"> <p> </p> <p align="center"> <input type="hidden" name="metode" value="tblLodges.intDistrictID"/> </select> <p> </p> <p align="center"<span class="style9">Enter District Number:</span> <input name="search" type="text" class="form" size="5"> </p> <div align="center"> <input type="submit" value="Click Here To View District Details" name="Go"> </p> <p align="center"> </p></td> </tr> </table> </form></td> <p> </p> <p> </p> <p> </p> <p> </p> </tr> <tr bordercolor="#660000" border="5"> <td height="24" valign="top" bgcolor="#FFFF99"> </td> </tr> <tr bordercolor="#660000" border="5"> <td height="64" valign="top" bgcolor="#546642"> <div align="center"><span class="style2"><b><br> <font color="#CCCCCC">Copyright © Grand Lodge of Florida, 2008, All Rights Reserved<br> <br> </font></b><font color="#CCCCCC"> 220 North Ocean Street * Jacksonville, FL 32202 · <font color="#CCCCCC">Phone: 318-443-5610 · Fax: 318-443-5759</font><a href="mailto:info@la-mason.com"><br> </a></font></span><a href="mailto:info@glflamason.org">Email the Grand Lodge</a> <span class="style2"> | Disclaimer of Liability | Site Map<font color="#CCCCCC"> | How To... <br> </font></span></div></td> </tr> </table></td> </tr> </table></td> </tr> </table></tr> </table> </td> </tr> </table> </body> </html> Here is the code for 5results.php <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> </head> <body> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody> <tr> <td width="100%"><p align="center"><span class="style2"> Grand Lodge of Florida Lodge Locator</span><br /> </p></td> </tr> </tbody> </table> <center> </center> <center> <br /> <br /> <table border="1" cellpadding="4" cellspacing="0" width="86%"> <tbody> <tr> <td colspan="5" bgcolor="FFFF99" height="18"><center> <strong>Results Of Your Search </strong> </center></td> </tr> <tr> <td width="13%" height="18" align="center" bgcolor="FFFF99"><center> Lodge ID Number </center></td> <td width="19%" height="18" align="center" bgcolor="FFFF99"><center> Lodge Name </center></td> <td width="20%" align="center" bgcolor="FFFF99"> Click Button To View Lodge Details </td> <td width="18%" height="18" align="center" bgcolor="FFFF99"><center> City </center></td> <td width="10%" height="18" align="center" bgcolor="FFFF99"><center> District Number </center></td> </tr> <?php $username = "username"; $password = "password"; $hostname = "localhost"; $dbhandle = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); $selected = mysql_select_db("database",$dbhandle) or die("Could not select database"); $query = mysql_query("SELECT strLodgeName, intLodgeNumber, intDistrictID, strLodgeMailingCity, strLodgeMailingPostCode FROM tblLodges WHERE TRIM(LEADING '0' FROM $metode) = '$search' GROUP BY strLodgeName LIMIT 50"); while ($row = @mysql_fetch_array($query)) { echo "<tr bgcolor=\"#dddddd\"><td><center>"; echo $row["intLodgeNumber"]; echo "</center></td><td><center>"; echo $row["strLodgeName"]; echo "</center></td><td><center><span class=\"style2\">"; echo "<input name=\"submit\" type=\"button\" value=\"Lodge Details\" onclick=\"javascript:window.location='5view.php?id="; echo $row["intLodgeNumber"]; echo "'\" /></center></td>"; echo "</center></td><td><center>"; echo $row["strLodgeMailingCity"]; echo "</center></td><td><center>"; echo ltrim($row["intDistrictID"], '0'); }?> </tbody> </table> <br /> </center> </body> </html> Here is the code for 3results.php (note the 3results.php and the 5results.php pages look alike because I haven't finished what I'm doing): <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> </head> <body> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody> <tr> <td width="100%"><p align="center"><span class="style2"> Grand Lodge of Florida Lodge Locator</span><br /> </p></td> </tr> </tbody> </table> <center> </center> <center> <br /> <br /> <table border="1" cellpadding="4" cellspacing="0" width="86%"> <tbody> <tr> <td colspan="5" bgcolor="FFFF99" height="18"><center> <strong>Results Of Your Search </strong> </center></td> </tr> <tr> <td width="13%" height="18" align="center" bgcolor="FFFF99"><center> Lodge ID Number </center></td> <td width="19%" height="18" align="center" bgcolor="FFFF99"><center> Lodge Name </center></td> <td width="20%" align="center" bgcolor="FFFF99"> Click Button To View <strong>Lodge Details </strong></td> <td width="18%" height="18" align="center" bgcolor="FFFF99"><center> City </center></td> <td width="10%" height="18" align="center" bgcolor="FFFF99"><center> District Number </center></td> </tr> <?php $username = "username"; $password = "password"; $hostname = "localhost"; $dbhandle = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); $selected = mysql_select_db("database",$dbhandle) or die("Could not select database"); $query = mysql_query("SELECT strLodgeName, intLodgeNumber, intDistrictID, strLodgeMailingCity, strLodgeMailingPostCode FROM tblLodges WHERE TRIM(LEADING '0' FROM $metode) = '$search' GROUP BY strLodgeName LIMIT 50"); while ($row = @mysql_fetch_array($query)) { echo "<tr bgcolor=\"#dddddd\"><td><center>"; echo $row["intLodgeNumber"]; echo "</center></td><td><center>"; echo $row["strLodgeName"]; echo "</center></td><td><center><span class=\"style2\">"; echo "<input name=\"submit\" type=\"button\" value=\"Lodge Details\" onclick=\"javascript:window.location='3view.php?id="; echo $row["intLodgeNumber"]; echo "'\" /></center></td>"; echo "</center></td><td><center>"; echo $row["strLodgeMailingCity"]; echo "</center></td><td><center>"; echo ltrim($row["intDistrictID"], '0'); }?> </tbody> </table> <br /> </center> </body> </html> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.