JTapp Posted February 19, 2008 Share Posted February 19, 2008 Thanks in advance for checking out my problem - I'm a beginner and really appreciate you guys. Here is my current code to view it in action go to: http://www.la-mason.com/search15.html and search for 'Lodge Name' = "Abbeville". I basically need to eliminate the BIG white space below the words "Lodge News: News": I also would like to know how to 'tighten' the text if I wanted to.. <?php $username = "****"; $password = "*****"; $hostname = "****"; $dbhandle = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); $selected = mysql_select_db("******",$dbhandle) or die("Could not select *******"); //error message (not found message)begins $XX = "No Record Found, to search again please close this window"; //query details table begins $query = mysql_query("SELECT tblLodges.strLodgeName, tblLodges.intLodgeNumber, tblLodges.strDistrictName, tblLodges.strLodgeWEB, tblLodges.strLodgeCounty, tblLodges.dtChartered, tblLodges.strLodgeAddress, tblLodges.strLodgeAddress2, tblLodges.strLodgeLocationCity, tblLodges.strLodgeLocationState, tblLodges.strLodgeLocationZip, tblLodges.strLodgeEmail, tblLodges.strLodgePhone, tblLodges.strLodgeFax, tblLodges.strDrivingDirectons, tblLodges.dtMeetingTime, tblLodges.dtMealTime, tblLodges.strFloorSchool, tblLodges.strLodgeNews, tblOfficers.strFirstName, tblOfficers.strLastName, tblLodgePics.link FROM tblLodges LEFT JOIN tblOfficers ON tblLodges.lngLodgeID = tblOfficers.lngLodgeID LEFT JOIN tblLodgePics ON tblLodgePics.lngLodgeID = tblLodges.lngLodgeID WHERE $metode LIKE '%$search%' GROUP BY tblLodges.strLodgeName LIMIT 0, 50"); while ($row = @mysql_fetch_array($query)) { $variable1=$row["strLodgeName"]; $variable2=$row["intLodgeNumber"]; $variable3=$row["strDistrictName"]; $variable4=$row["strLodgeWEB"]; $variable5=$row["strLodgeCounty"]; $variable6=$row["dtChartered"]; $variable7=$row["strLodgeAddress"]; $variable8=$row["strLodgeAddress2"]; $variable9=$row["strLodgeLocationCity"]; $variable10=$row["strLodgeLocationState"]; $variable11=$row["strLodgeLocationZip"]; $variable12=$row["strLodgeEmail"]; $variable13=$row["strLodgePhone"]; $variable14=$row["strLodgeFax"]; $variable15=$row["strDrivingDirectons"]; $variable16=$row["dtMeetingTime"]; $variable17=$row["dtMealTime"]; $variable18=$row["strFloorSchool"]; $variable19=$row["strLodgeNews"]; $variable20=$row["link"]; //table layout for results print ("<tr>"); echo "<center>\n"; echo "<p><b>GRAND LODGE OF LOUISIANA - LODGE LOCATOR RESULTS</b>\n</p>"; echo "<b>Lodge Name:</b> $variable1</p>"; echo "<p><b>Lodge Number:</b> $variable2</p>"; echo "<img src='{$row['link']}'>"; echo "<p><b>District Name:</b> $variable3</p>"; echo "<a href=\"$variable4\">Click Here To Go To The Lodge Website</a>"; echo "<p><b>Lodge County:</b> $variable5</p>"; echo "<p><b>Lodge Chartered On:</b> $variable6</p>"; echo "<p><b>Lodge Address:</b> $variable7, $variable8</p>"; echo '<p>' . $variable9 . $variable10 . $variable11 . '</p>'; echo "<a href=mailto:\"$variable12\">Click Here To Email The Lodge</a>"; echo "<p><b>Lodge Phone Number:</b> $variable13, <b>Lodge FAX Number:</b> $variable14</p>"; echo "<p><b>Lodge Driving Directions:</b> $variable15</p>"; echo "<p><b>Lodge Lodge Meeting Time:</b> $variable16</p>"; echo "<p><b>Lodge Lodge Meal Time:</b> $variable17</p>"; echo "<p><b>Lodge Floor School:</b> $variable18</p>"; echo "<p><b>Lodge News:</b> $variable19</p>"; echo "</center>\n"; print ("</tr>"); } ?> </table> <?php //query details table begins $query = mysql_query("SELECT tblLodges.strLodgeName, tblLodges.intLodgeNumber, tblLodges.strDistrictName, tblLodges.strLodgeLocationCity, tblLodges.strLodgeLocationZip, tblLodges.strLodgeCounty, tblOfficers.lngOfficerTitleID, tblOfficers.strFirstName, tblOfficers.strLastName, tblOfficers.BusinessPhone, tblOfficers.PersEmail FROM tblLodges LEFT JOIN tblOfficers ON tblLodges.lngLodgeID = tblOfficers.lngLodgeID WHERE $metode LIKE '%$search%' LIMIT 0, 30"); $results=mysql_query($query); echo "<center>\n"; echo "<b>Roster of Lodge Officers</b>\n"; echo "<table border='1'> <tr> <th>Officer Title</th> <th>Officer First</th> <th>Officer Last</th> <th>Officer Email</th> <th>Officer Phone</th> </tr>"; while ($row = mysql_fetch_array($query)) { $variable1=$row["lngOfficerTitleID"]; $variable2=$row["strFirstName"]; $variable3=$row["strLastName"]; $variable4=$row["PersEmail"]; $variable5=$row["BusinessPhone"]; //table layout for results print ("<tr>"); echo "<tr align=\"center\" bgcolor=\"#EFEFEF\">\n"; echo "<td class=\"td_id\">$variable1</td>"; echo "<td class=\"td_id\">$variable2</td>"; echo "<td class=\"td_id\">$variable3</td>"; echo "<td class=\"td_id\">$variable4</td>"; echo "<td class=\"td_id\">$variable5</td>"; print ("</tr>"); } ?> Quote Link to comment Share on other sites More sharing options...
duclet Posted February 19, 2008 Share Posted February 19, 2008 There isn't anything in your PHP code that is creating that problem. The problem is you have an large empty table with a height of 396 pixels in between them. If you remove that table, it should do the trick. Quote Link to comment Share on other sites More sharing options...
craygo Posted February 19, 2008 Share Posted February 19, 2008 usually you would need a table column<td> Maybe change this print ("<tr>"); echo "<td align=\"center\">\n"; then close it at the end echo "</td>\n"; print ("</tr>"); Also take out the table height EDIT: beat me to it Ray Quote Link to comment Share on other sites More sharing options...
JTapp Posted February 19, 2008 Author Share Posted February 19, 2008 Hi Guys, I reluctantly removed the table height because it was part of a template that impacted 100+ pages. But it seems like my site is fine with the removal... however... it didn't fix my problem. I loaded it on that results15.php page if you want to view the source... Any other ideas? Quote Link to comment Share on other sites More sharing options...
craygo Posted February 19, 2008 Share Posted February 19, 2008 you also have the height in the <table> viewing the source change this <table width="92%" border="0" cellpadding="0" height="458" align="center"> <----------change the height here <tr> <td valign="top" align="left"><!-- #BeginEditable "main" --> if you want to keep the pages working add a check to change the height if($search){ $height = ""; } else { $height = "458"; } then change the table height to <table width="92%" border="0" cellpadding="0" height="<? echo $height; ?>" align="center"> Ray Quote Link to comment Share on other sites More sharing options...
JTapp Posted February 19, 2008 Author Share Posted February 19, 2008 Thanks Craygo - it worked - I just changed the template as you suggested. I'm just going to upload all of my other pages shortly and hopefully there will be little or no impact. Have a great night. 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.