Jump to content

JTapp

Members
  • Posts

    251
  • Joined

  • Last visited

Everything posted by JTapp

  1. Yeah.. I figured you saw my latest posting. But I noticed you were offline and didn't know if I would ever hear from you again. Seems like an old posting with responses might not get any more attention - I don't know. Regarding "solving" the posting.. the option to "click here" to solve is now gone. I've got a couple of postings like that.. I don't know how to get rid of them.. Thanks again.
  2. You absolutely rock! I'm going to bed! My health and well being appreciates it. Thank you very much.
  3. Oh - sorry my communication gets worse after lack of sleep. Yes, the link is showing up just fine. I'm actually trying to display or embed the image.. not the link. Thanks
  4. Problem: I need to display an image (unique to my ID field) and display it on my webpage. At this point my stomach turns when I look at my existing code (I'm soooo new at this). But I have to somehow add to my code to get this done. Any help is greatly appreciated. There are three tables, the newest one is called 'tblLodgePics'- this is where I'm storing my image data. The code below is trying to find the 'link' and display it that way. (also known as $variable20 below). I have created a bin_data to upload the images to via another PHP page, but I haven't figured that out yet... I need a script for it. It currently has the following fields in my tblLodgePics: id varchar(15), description varchar(255), bin_data LONGBLOB, filename varchar(50), filesize varchar(50), filetype varchar(50), link varchar(255), shownno integer(5), clickcount integer(5), lngLodgeID (this is my unique field that can be found in the other 2 tables) Here is my current code to view it in (unformatted) action go to: http://www.la-mason.com/search15.html and search for 'Lodge Name' = "Abbeville". I basically need to embed Abbeville's photo into this page: //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["strLodgeAddress3"]; $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 '<p><h3>' . $variable1 . '</h3></p><p>' . $variable2 . '</p>'; echo '<p>' . $variable3 . '</p>'; echo "<a href=\"$variable4\">Click Here To Go To The Lodge Website</a>"; echo '<p>' . $variable5 . '</p>' . $variable6 . '</p>'; echo '<p>' . $variable7 . '</p>' . $variable8 . '</p>' . $variable9 . '</p>' . $variable10 . '</p>' . $variable11 . '</p>'; echo "<a href=mailto:\"$variable12\">Click Here To Email The Lodge</a>"; echo '</p>' . $variable13 . '</p>' . $variable14 . '</p>'; echo '<p>' . $variable15 . '</p>'; echo '<p>' . $variable16 . '</p>' . $variable17 . '</p>' . $variable18 . '</p>'; echo '<p>' . $variable19 . '</p>'; echo '<p>' . $variable20 . '</p>'; print ("</tr>"); } ?> </tr> </table> <hr width=75% align=center size=4> <p><strong>Roster of Lodge Officers </strong></p> <p> <?php //query details table begins $query = mysql_query("SELECT tblLodges.strLodgeName, tblLodges.intLodgeNumber, tblLodges.strDistrictName, tblLodges.strLodgeLocationCity, tblLodges.strLodgeLocationZip, tblLodges.strLodgeCounty, tblOfficers.strFirstName, tblOfficers.strLastName, tblOfficers.BusinessPhone, tblOfficers.PersEmail FROM tblLodges LEFT JOIN tblOfficers ON tblLodges.lngLodgeID = tblOfficers.lngLodgeID WHERE $metode LIKE '%$search%' LIMIT 0, 50"); $results=mysql_query($query); echo "<table border='1'> <tr> <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["strFirstName"]; $variable2=$row["strLastName"]; $variable3=$row["PersEmail"]; $variable4=$row["BusinessPhone"]; //table layout for results print ("<tr>"); echo "<td class=\"td_id\"><h3>$variable1</h3></td>\n"; echo "<td class=\"td_id\"><h3>$variable2</h3></td>\n"; echo "<td class=\"td_id\"><h3>$variable3</h3></td>\n"; echo "<td class=\"td_id\"><h3>$variable4</h3></td>\n"; echo "<td class=\"td_id\"><h3>$variable5</h3></td>\n"; print ("</tr>"); } ?>
  5. Ok, it is communicating with the new table and my link is showing up. But I don't think I wrote my echo right... ? echo $row['link'];
  6. Thanks. I'm working on this.. but I have to fix another .php which is add picture to database. I'll let you know. Appreciating your time
  7. That worked, but everything below it has been turned into a link to that variable... Thanks
  8. Hey Guys.. this is REALLY a simple one- but not for me 'cause I'm just now learning this stuff. The following code is my problem. When I preview it.. it looks like its working but my hyperlink is actually http://www.fieldcontents.com/$variable4 I need to drop the "$variable4" from my link.... ??? echo 'You must <a href="$variable4">Click Here To Go To The Lodge Website</a> to view this page'; Thanks for your help
  9. **Please forgive my overly complicated beginner's code and language** Situation: My query currently pulls from two tables using $metode LIKE '%$search%' I now have a new, third table that includes the same UniqueID as the other two. I do not need to include it in the search function, but this new table is designed to store images. Problem: I need to retrieve the image (unique to my ID field) and display it on my webpage. At this point my stomach turns when I look at my existing code. But I have to somehow add to my code to get this done. Any help is greatly appreciated. The new table is called 'tblLodgePics' It currently has the following fields in it: id varchar(15), description varchar(255), bin_data LONGBLOB, filename varchar(50), filesize varchar(50), filetype varchar(50), link varchar(255), shownno integer(5), clickcount integer(5), lngLodgeID (this is my unique field that can be found in the other 2 tables) Here is my current code to view it in (unformatted) action go to: http://www.la-mason.com/search15.html and search for 'Lodge Name' = "Abbeville". I basically need to embed Abbeville's photo into this page: //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 FROM tblLodges LEFT JOIN tblOfficers ON tblLodges.lngLodgeID = tblOfficers.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["strLodgeAddress3"]; $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"]; //table layout for results print ("<tr>"); echo '<p><h3>' . $variable1 . '</h3></p><p>' . $variable2 . '</p>'; echo '<p>' . $variable3 . '</p>' . $variable4 . '</p>'; echo '<p>' . $variable5 . '</p>' . $variable6 . '</p>'; echo '<p>' . $variable7 . '</p>' . $variable8 . '</p>' . $variable9 . '</p>' . $variable10 . '</p>' . $variable11 . '</p>'; echo '<p>' . $variable12 . '</p>' . $variable13 . '</p>' . $variable14 . '</p>'; echo '<p>' . $variable15 . '</p>'; echo '<p>' . $variable16 . '</p>' . $variable17 . '</p>' . $variable18 . '</p>'; echo '<p>' . $variable19 . '</p>'; print ("</tr>"); } ?> </tr> </table> <hr width=75% align=center size=4> <p><strong>Roster of Lodge Officers </strong></p> <p> <?php //query details table begins $query = mysql_query("SELECT tblLodges.strLodgeName, tblLodges.intLodgeNumber, tblLodges.strDistrictName, tblLodges.strLodgeLocationCity, tblLodges.strLodgeLocationZip, tblLodges.strLodgeCounty, tblOfficers.strFirstName, tblOfficers.strLastName, tblOfficers.BusinessPhone, tblOfficers.PersEmail FROM tblLodges LEFT JOIN tblOfficers ON tblLodges.lngLodgeID = tblOfficers.lngLodgeID WHERE $metode LIKE '%$search%' LIMIT 0, 50"); $results=mysql_query($query); echo "<table border='1'> <tr> <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["strFirstName"]; $variable2=$row["strLastName"]; $variable3=$row["PersEmail"]; $variable4=$row["BusinessPhone"]; //table layout for results print ("<tr>"); echo "<td class=\"td_id\"><h3>$variable1</h3></td>\n"; echo "<td class=\"td_id\"><h3>$variable2</h3></td>\n"; echo "<td class=\"td_id\"><h3>$variable3</h3></td>\n"; echo "<td class=\"td_id\"><h3>$variable4</h3></td>\n"; echo "<td class=\"td_id\"><h3>$variable5</h3></td>\n"; print ("</tr>"); } ?>
  10. I'm having a problem closing threads as well. Don't reply to this and look for a blue button that has "topic resolved" on it. See if that works. I'll check back.
  11. Indeed. I have no idea what I'm doing and copied it from another post. Your stomach might turn if I tell you the truth... but here goes. There are 20 variables in the table - I've listed 19 variables instead of using SELECT * because I don't know how to format them otherwise... I need to be able to center the results in the page and format their sizes and spaces, etc. After countless hours of searching, I couldn't find a tutorial that talks abut formating your data (I found one that talks about tables, hence my little subform). Anyway.. thanks so much for your help. Your suggestion worked nicely. Here's a PHP Freaks question for you.. how do I end my post as "resolved" if I am the last person to reply to the posting? Thanks again and have a great evening.
  12. Thanks for your Post!! Sorry for the ignorance.. but could you tell me exactly where to put it?
  13. Sorry for the immature code and language.. I'm a beginner. Situation - I've got two tables let's just say Companies and Employees. Some Companies have one employee others have several. I'm needing to format the webpage so the company information is at the top and there is sort of a "subform" (forgive the MS Access talk) at the bottom of the page listing the employees and their contact information. Problem - When there is just one employee everything looks great. But when there are more 2 or more employees, the upper half of my webpage which is the company information repeats the information according to how many employees there are. Here is the code (to view it in action go to: http://www.la-mason.com/search15.html and search for 'Lodge Name' = "Abbeville": //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 FROM tblLodges LEFT JOIN tblOfficers ON tblLodges.lngLodgeID = tblOfficers.lngLodgeID WHERE $metode LIKE '%$search%' 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["strLodgeAddress3"]; $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"]; //table layout for results print ("<tr>"); echo '<p><h3>' . $variable1 . '</h3></p><p>' . $variable2 . '</p>'; echo '<p>' . $variable3 . '</p>' . $variable4 . '</p>'; echo '<p>' . $variable5 . '</p>' . $variable6 . '</p>'; echo '<p>' . $variable7 . '</p>' . $variable8 . '</p>' . $variable9 . '</p>' . $variable10 . '</p>' . $variable11 . '</p>'; echo '<p>' . $variable12 . '</p>' . $variable13 . '</p>' . $variable14 . '</p>'; echo '<p>' . $variable15 . '</p>'; echo '<p>' . $variable16 . '</p>' . $variable17 . '</p>' . $variable18 . '</p>'; echo '<p>' . $variable19 . '</p>'; print ("</tr>"); } ?> </tr> </table> <hr width=75% align=center size=4> <p><strong>Roster of Lodge Officers </strong></p> <p> <?php //query details table begins $query = mysql_query("SELECT tblLodges.strLodgeName, tblLodges.intLodgeNumber, tblLodges.strDistrictName, tblLodges.strLodgeLocationCity, tblLodges.strLodgeLocationZip, tblLodges.strLodgeCounty, tblOfficers.strFirstName, tblOfficers.strLastName, tblOfficers.BusinessPhone, tblOfficers.PersEmail FROM tblLodges LEFT JOIN tblOfficers ON tblLodges.lngLodgeID = tblOfficers.lngLodgeID WHERE $metode LIKE '%$search%' LIMIT 0, 50"); $results=mysql_query($query); echo "<table border='1'> <tr> <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["strFirstName"]; $variable2=$row["strLastName"]; $variable3=$row["PersEmail"]; $variable4=$row["BusinessPhone"]; //table layout for results print ("<tr>"); echo "<td class=\"td_id\"><h3>$variable1</h3></td>\n"; echo "<td class=\"td_id\"><h3>$variable2</h3></td>\n"; echo "<td class=\"td_id\"><h3>$variable3</h3></td>\n"; echo "<td class=\"td_id\"><h3>$variable4</h3></td>\n"; echo "<td class=\"td_id\"><h3>$variable5</h3></td>\n"; print ("</tr>"); } ?> Thanks in advance for checking out my problem.
  14. Here is my latest code - it is displaying Table 2 nicely in a table. However, I need Table 1 data to be displayed at the top of the page and not in a table. Nothing is coming up... $query = mysql_query("SELECT tblLodges.strLodgeName, tblLodges.intLodgeNumber, tblLodges.strDistrictName, tblLodges.strLodgeLocationCity, tblLodges.strLodgeLocationZip, tblLodges.strLodgeCounty, tblOfficers.strFirstName, tblOfficers.strLastName, tblOfficers.BusinessPhone, tblOfficers.PersEmail FROM tblLodges LEFT JOIN tblOfficers ON tblLodges.lngLodgeID = tblOfficers.lngLodgeID WHERE $metode LIKE '%$search%' LIMIT 0, 50"); $results=mysql_query($query); { $variable1=$row["strLodgeName"]; $variable2=$row["intLodgeNumber"]; $variable3=$row["strDistrictName"]; $variable4=$row["strLodgeLocationCity"]; //table layout for results print ("<tr>"); print ("<td>$variable1</td>"); print ("<td>$variable2</td>"); print ("<td>$variable3</td>"); print ("<td>$variable4</td>"); print ("</tr>"); } echo "<table border='1'> <tr> <th>Officer First</th> <th>Officer Last</th> <th>Officer Business Phone</th> <th>Officer Email</th> </tr>"; while ($row = mysql_fetch_array($query)) { $variable1=$row["strFirstName"]; $variable2=$row["strLastName"]; $variable3=$row["BusinessPhone"]; $variable4=$row["PersEmail"]; //table layout for results print ("<tr>"); echo "<td class=\"td_id\"><h3>$variable1</h3></td>\n"; echo "<td class=\"td_id\"><h3>$variable2</h3></td>\n"; echo "<td class=\"td_id\"><h3>$variable3</h3></td>\n"; echo "<td class=\"td_id\"><h3>$variable4</h3></td>\n"; echo ("</tr>"); } ?>
  15. It's trying to work. Here is the link to see the results http://www.la-mason.com/results11.php I know its trying because there are two Table 2 records that map to the Table 1 field DenverColorado ("strLodgeName"). It's just not displaying the rest of the information... Does that make sense?
  16. I just don't know if this is complicated or not. Being that I've spent HOURS on it.. but I'm aslo a beginner... I need to display the results of a database in a particular format. I have two tables to pull from. The problem is I need the upper half of my webpage to display the results from one table and the bottom half of my webpage to display the results of the other table and I'm using a $metode function to query everything. Here is my immature and totally gutted/ code: //query details $query = mysql_query("SELECT tblLodges.strLodgeName, tblOfficers.strFirstName, tblOfficers.strLastName FROM tblLodges LEFT JOIN tblOfficers ON tblLodges.lngLodgeID = tblOfficers.lngLodgeID WHERE $metode LIKE '%$search%' LIMIT 0, 50"); while ($row = @mysql_fetch_array($query)) { $variable1=$row["strLodgeName"]; $variable2=$row["strLodgeID"]; $variable3=$row["strDistrictName"]; $variable4=$row["strLodgeLocationCity"]; $variable5=$row["strLodgeLocationZip"]; $variable6=$row["strLodgeCounty"]; $variable7=$row["strFirstName"]; $variable8=$row["strLastName"]; //table layout for results print ("<tr>"); echo "<td class=\"td_id\"><h3>$variable1</h3></td>\n"; echo "<td class=\"td_id\">$variable2</td>\n"; echo "<td class=\"td_id\">$variable3</td>\n"; print "<td class=\"td_id\">$variable4</td>\n"; print "<td class=\"td_id\">$variable5</td>\n"; print "<td class=\"td_id\">$variable6</td>\n"; print ("</tr>"); } ?> <p class="style1">Roster of Officers </p> <hr width=75% align=center size=4> <p> <?php echo "<table border='1'> <tr> <th>Officer First Name</th> <th>Officer Last Name</th> <th>Officer Business Phone</th> <th>Officer Email</th> </tr>"; { echo "<tr>"; echo "<td>" . $row['strFirstName'] . "</td>"; echo "<td>" . $row['strLastName'] . "</td>"; echo "<td>" . $row['BusinessPhone'] . "</td>"; echo "<td>" . $row['PersEmail'] . "</td>"; echo "</tr>"; } echo "</table>"; ?>
  17. Sweeet! I can finally go to bed! Have a great night!
  18. Newbie here. Much to my surprise and a bit of help from you guys, my PHP pages seem to be working just fine. I just need to format how my database results are presented on my webpage. All I want to do is make one field's results a bigger font type than the others- I want to put a paragraph break in between another field's results, etc. Can anybody point me to a post/webpage.. anything Thanks so much for your time!!!!!
  19. This was resolved in another post. Just trying to close it by typing this post.
  20. Ok, I removed the t1 and the t2 in the blue font and your solution worked. Thank you very much. You fixed something in 5 minutes that I struggled with for the past 48 hours. On another note - my guru - can you direct me to a tutorial or a site or a posting that can help me to format my database results? I want to make some fields results in a larger font, insert a paragraph break here and there.. etc. I found how to insert a table.. but I require more than that. I keep trying to exit PHP and go into HTML but it seems so incorrect... If you can't help or don't have time, no worries. I thank you so much for the assistance you've already provided.
  21. pocobueno1388- I'm testing your suggestion but don't understand the information I've highlighted in blue. This seems redundant.. can you clarify for me? Thanks again. t1.field1, t1.field2, t2.field1, t2.field2 FROM table1 t1 LEFT JOIN table2 t2 ON t1.ID_field = t2.ID_field WHERE $metode LIKE '%$search%' LIMIT 0, 50 *** GOT YOUR LAST POST WHILE I WAS TYPING.. WILL TRY IT, THANKS **
  22. Thanks soooo much for taking the time. I'm such a beginner.. so my apologies for ignorance. I think this is what you are asking me for: My search.html file code is: <p align="center"> <select name="metode" size="1"> <option value="table1field1">table1field1</option> <option value="table1field2">table1field2</option> <option value="table2field1">table2field2</option> <option value="table2field2">table2field2</option> </select> <input type="text" name="search" size="25"> <br> Search database: <input type="submit" value="Go!!" name="Go"></p> </td>
  23. OK - I will spend HOURS on anything I get from you guys. Thanks in advance for reading my immature code. The following is my crap code. Two tables: Table 1 is tblLodges and its field is strLodgeName - Unique field is lngLodgeID Table 2 is tblOfficers and the fields are strLastName and strFirstName - Unique field is also lngLodgeID I need my statement to work from to a drop down html search page. $query = "SELECT tblLodges.strLodgeName, tblOfficers.strLastName, tblOfficers.strFirstName". "FROM tblLodges, tblOfficers ". "WHERE tblLodges.lngLodgeID = tblOfficers.lngLodgeID";
  24. csj - I have the EXACT same problem. Nobody seems to be responding to my post. The one response you got - I spent about 45 minutes on.. trying to understand what the heck they were saying. Were you ever able to figure this out?
×
×
  • 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.