Jump to content

JTapp

Members
  • Posts

    251
  • Joined

  • Last visited

Everything posted by JTapp

  1. Here is page one of my code. Can you please tell me if I have to change anything on here before I begin to try to fix the main php? form name="form1" method ="post" action="http://www.gloklahoma.com/lodgelocator/3results.php" target="_blank"> <table width="849" border="0" align="center"> <tr> <th width="812" bgcolor="#fff" class="form_1" scope="col"> <p class="style1"> </p> <p align="center"><span class="heading_1">Grand Lodge of Oklahoma - Lodge Locator</span></p> <p align="center"><span class="heading_1">*** SERVER UPDATE - PLEASE TRY BACK LATER ***</span></p> <p class="style1"><img src="../images/line.gif" width="327" height="23"></p> <p class="style1"> <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.strLodgeLocationCity">City Lodge Is Located In</option> <option value="tblLodges.strLodgeLocationZIP">Zip Code of Lodge Location</option> <option value="tblLodges.strLodgeCounty">Lodge County</option> </select> <span class="text_1">Search Value:</span><span class="copy_1"> <input name="search" type="text" class="form" size="25"> </span> </p> <p class="style1"> <input type="submit" value="Click Here To Search Our Lodge Locator!!" name="GOTWO2"> </p> <p class="style1"> </p></th> </tr> </table> </form>
  2. Well I searched this site and Google and couldn't find much help. I tried plugging it in, but it returned: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/content/62/5287962/html/lodgelocator/3results.php on line 572 $query = mysql_query("SELECT strLodgeName, intLodgeNumber, intDistrictID, strLodgeLocationCity, strLodgeLocationZIP FROM tblLodges WHERE TRIM(LEADING '0') = '$search' GROUP BY strLodgeName LIMIT 50"); while ($row = @mysql_fetch_array($query)) $sql = "SELECT strLodgeName, intLodgeNumber, intDistrictID, strLodgeLocationCity FROM tblLodges WHERE TRIM(LEADING '0' FROM $_POST['metode']) = $_POST['search'] GROUP BY strLodgeName LIMIT 50"; if ($results = mysql_query($sql)) { if (mysql_num_rows($results)) { while ($row = mysql_fetch_assoc($results)) { 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='http://www.gloklahoma.com/lodgelocator/3view.php?id="; echo $row["intLodgeNumber"]; echo "'\" /></center></td>"; echo "</center></td><td><center>"; echo $row["strLodgeLocationCity"]; echo "</center></td><td><center>"; echo ltrim($row["intDistrictID"], '0'); } } else { echo "No records found"; } } else { echo "Query failed<br >" . mysql_error() . "<br>$sql"; }?> Can anybody point me to a $_POST['metode'] thread where I might be able to figure this out? Thanks
  3. This would be an approach I'm not familiar with.. I'm willing to put in the research and try to go find out how to do it.. but considering all of the work that has been done on this, and the fact that the EXACT same code is working on another server - the idea of re-writing it confuses me.
  4. I have narrowed down an issue and a question from a previous thread. It seems more complicated than I thought. Is there a chance that $metode and $search hoses the php when it is MySQL 5.0? The following code isn't loading: $query = mysql_query("SELECT strLodgeName, intLodgeNumber, intDistrictID, strLodgeLocationCity 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='http://www.gloklahoma.com/lodgelocator/3view.php?id="; echo $row["intLodgeNumber"]; echo "'\" /></center></td>"; echo "</center></td><td><center>"; echo $row["strLodgeLocationCity"]; echo "</center></td><td><center>"; echo ltrim($row["intDistrictID"], '0'); Reply
  5. I don't know - this seems to be related to the server.. am I wrong?
  6. Makes complete sense.. that's what I was checking out before my post... I'll still looking.. To see this in action - go to: http://www.glflamason.org/lodgelocator/5search.php and search for "washington" it goes from 5search.php to 3results.php to 3view.php
  7. ah! Here is the return: Query failed You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') = '' GROUP BY strLodgeName LIMIT 50' at line 1 SELECT strLodgeName, intLodgeNumber, intDistrictID, strLodgeLocationCity FROM tblLodges WHERE TRIM(LEADING '0' FROM ) = '' GROUP BY strLodgeName LIMIT 50
  8. Anybody into Google search code? I created a Custom Search - where they provide the html search code and the html results code. I'm trying to convert their html search code to a getURL function in flash that points to my html results page. Here is the customized search code Google provided for searching my own site: <form action="http://www.gloklahoma.com/searchresults.com" id="cse-search-box"> <div> <input type="hidden" name="cx" value="008521448308629498442:k9ew4jiha1c" /> <input type="hidden" name="cof" value="FORID:10" /> <input type="hidden" name="ie" value="UTF-8" /> <input type="text" name="q" size="31" /> <input type="submit" name="sa" value="Search" /> </div> </form> <script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&lang=en"></script> Here is the customized search results code Google provided: <div id="cse-search-results"></div> <script type="text/javascript"> var googleSearchIframeName = "cse-search-results"; var googleSearchFormName = "cse-search-box"; var googleSearchFrameWidth = 600; var googleSearchDomain = "www.google.com"; var googleSearchPath = "/cse"; </script> <script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script> I am trying to do something like this in flash - geez I'm all screwed up at this point: on(release) {getURL("http://www.google.com/search?q= " + escape(inputField.text+" site:www.gloklahoma.com"), "_blank")}
  9. Thanks for your time. Results in: Parse error: syntax error, unexpected T_IF in /home/content/62/5287962/html/lodgelocator/3results.php on line 569 Line 568-570 is: $sql = "SELECT strLodgeName, intLodgeNumber, intDistrictID, strLodgeLocationCity FROM tblLodges WHERE TRIM(LEADING '0' FROM $metode) = '$search' GROUP BY strLodgeName LIMIT 50" if ($results = mysql_query($sql)) { if (mysql_num_rows($results)) {
  10. I don't know seems too complicated to post this but.. I thought I would try. Here is a bit of my code... it is not returning the data, but also no errors. Any ideas? $query = mysql_query("SELECT strLodgeName, intLodgeNumber, intDistrictID, strLodgeLocationCity 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='http://www.gloklahoma.com/lodgelocator/3view.php?id="; echo $row["intLodgeNumber"]; echo "'\" /></center></td>"; echo "</center></td><td><center>"; echo $row["strLodgeLocationCity"]; echo "</center></td><td><center>"; echo ltrim($row["intDistrictID"], '0');
  11. Everything seemed to be working fine. I have a table, it alphabetically lists a bunch of cities and relivant city data. However, I found out that the city is showing up only one time when I have can have more than one rows with that City name.. I.e. - I should have 15 rows that are all "Jacksonville" but I am only seeing one. I guess my code is eliminating what it thinks are duplicates? Here is my code (I renamed field names for communication purposes) $dbhandle = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); $selected = mysql_select_db("companies",$dbhandle) or die("Could not select companies"); $query = mysql_query("SELECT* FROM companies GROUP BY City"); while ($row = @mysql_fetch_array($query)) { $variable1=$row["Email"]; $variable2=$row["WEB"]; echo "<tr bgcolor=\"#dddddd\"><td><center>"; echo $row["City"]; echo ($variable2 != '') ? "<a href=\"$variable2\"></br> Website</a>" : ''; echo ($variable1 != '') ? "<a href=\"mailto:$variable1\">Email</a>" : ''; echo ltrim($row[""], '0'); }?>
  12. Thanks but it didn't work... it doesn't return anything ... but the words $variable5 are black instead of red in my code...
  13. I tried this but it is not working: echo "<td class=\"td_id\"><a href=\"mailto:$variable5\</td>\n";
  14. Here's my latest - anybody have any ideas as to what is wrong?? echo "<td class=\"td_id\"><a href=\"mailto:$variable5\"</td>\n";
  15. This line has suddenly stopped working for me.. any ideas? echo "<td class=\"td_id\"><a href=\"mailto:$variable5\"></td>\n";
  16. This is as close as I can get to making it worK: echo "<td class=\"td_id\">$variable4</td>\n"; echo "<td class=\"td_id\"><a href=\"mailto:$variable5>\n"; echo "<td class=\"td_id\">$variable5</td>\n";
  17. Thanks but no.. it just made the hyperlink disappear.
  18. Geez.. I just can't remember doing this.. I did it last year sometime. Here is more code I'm using .. its just giving me trouble echo "<td class=\"td_id\">$variable4</td>\n"; echo "<td class=\"td_id\"><a href=\"mailto:$variable5\</td>\n"; echo "<td class=\"td_id\">$variable5</td>\n";
  19. Still having the problem... playing around though..
  20. Here is the line: echo "<td class=\"td_id\"><a href=\"mailto:$variable5\</td>\n"; I'll play around with what you said.. although I'm not 100% clear. Thanks
  21. Here is a table with an example: http://www.glflamason.org/lodgelocator/3view.php?id=13 Thanks
  22. All of a sudden I'm getting the following characters after somebody clicks on my email links: </td><td class= for example - they would click on the email link, it would open up a new email message and look like this: name@msn.com</td><td class= Do you guys know how I can fix this? Here is my line of code: $variable12=$row["Email"];
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.