JTapp
-
Posts
251 -
Joined
-
Last visited
Posts posted by JTapp
-
-
LooieENG - It didn't have to be an ALT tag.. thanks much!!!
-
Well, its pretty close. I'm getting the message, but it keeps the red "x".
[attachment deleted by admin]
-
Thanks for trying!
I tested it and got a blank page..
-
Does anybody know how I can display the ALT words "The image is not available" to the following line - so I can get rid of that little red "x" when the image isn't available?
echo "<img src='" . $imagesFolder . $row['CompanyID'] . ".jpg' /></p>";
-
Worked beautifully! Thanks for taking the time!
-
Yeah.. umm.. I might be dreaming. Here is a fictitious explanation of what I would like to do:
field #1 is a company number (field name = companyID)
field #2 is a field that was designed to hold a photo (field name = PhotoPath)
I have over 300 company photos stored on my server that are named by the company number (ie, company #1 is named 1.jpg)
I was going to manually go into field #2 and type in a hyperlink to the location of the photo on the server using the following line of code in my PHP:
echo "<img src='{$row['PhotoPath']}'>";
Now I'm wondering if I can have an echo line that combines - location where photos are on my server, Field #1 and .jpg to generate a hyperlink. Bypassing the need for my field #2.
Hope this makes sense...
-
Perfect. Thanks so much! I don't think this is the first time you have helped me either.
-
Well - my $variable15 is a real field in the database that is actually empty throughout.
It was designed to literally type in turn by turn driving directions. I was hoping to get rid of it completely.
That said, the Google map isn't returning anything (says check your spelling).
The ending address is a combination of these variables:
$variable7=$row["strLodgeMeetingPlace"];
$variable8=$row["strLodgeLocationCity"];
$variable9=$row["strLodgeLocationState"];
$variable10=$row["strLodgeLocationZip"];
I was just playing around trying to get it to work (no luck).
-
jonsjava - do you have a minute to look at my code?
I've tried to add what you gave me, but I'm afraid it seems to interfere with my existing mysql_fetch_array.. My query is already kind of complicated..
The fields suppling the address would be: strLodgeMeetingPlace, strLodgeLocationCity, strLodgeLocationState, strLodgeLocationZip
$id = $_GET['id']; $query = mysql_query("SELECT a.strLodgeName, a.intLodgeNumber, a.intDistrictID, a.strLodgeWEB, a.strLodgeCounty, a.dtChartered, a.strLodgeMeetingPlace, a.strLodgeLocationCity, a.strLodgeLocationState, a.strLodgeLocationZip, a.strLodgeEmail, a.strLodgePhone, a.strLodgeFax, a.strDrivingDirectons, a.dtMeetingTime, a.strMeetingCodes, a.dtMealTime, a.strFloorSchool, a.strLodgeNews, a.strLodgePhotoPathAndName, b.strOfficerTitle, b.strFirstName, b.strLastName, b.BusinessPhone, b.PersEmail FROM tblLodges a LEFT JOIN tblOfficers b ON a.lngLodgeID = b.lngLodgeID WHERE a.intLodgeNumber=$id GROUP BY a.strLodgeName LIMIT 50")or die(mysql_error()); while ($row = @mysql_fetch_array($query)) { $variable1=$row["strLodgeName"]; $variable2=$row["intLodgeNumber"]; $variable3=$row["intDistrictID"]; $variable4=$row["strLodgeWEB"]; $variable5=$row["strLodgeCounty"]; $variable6=$row["dtChartered"]; $variable7=$row["strLodgeMeetingPlace"]; $variable8=$row["strLodgeLocationCity"]; $variable9=$row["strLodgeLocationState"]; $variable10=$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["strLodgePhotoPathAndName"]; $variable21=$row["strMeetingCodes"]; //table layout for results echo "<center>\n"; echo "<p><H3>LODGE DETAILS</H4>\n</p>"; echo "<p><b>Lodge Name:</b> $variable1</p>"; echo "<p><b>Lodge Number:</b> $variable2</p>"; echo "<p><b>District Name:</b> $variable3</p>"; echo "<a href=\"mailto:\"$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></p>"; echo "<p>$variable7 $variable8</p>"; echo "<p>$variable9, $variable10</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 Meetings:</b> $variable21</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 "<img src='{$row['strLodgePhotoPathAndName']}'>"; echo "</center>\n"; } ?> <hr> <p> <?php //query details table begins $query = mysql_query("SELECT tblLodges.strLodgeName, tblLodges.intLodgeNumber, tblLodges.intDistrictID, tblLodges.strLodgeLocationCity, tblLodges.strLodgeLocationZip, tblLodges.strLodgeCounty, tblOfficers.lngLodgeID, tblOfficers.strOfficerTitle, tblOfficers.strFirstName, tblOfficers.strLastName, tblOfficers.BusinessPhone, tblOfficers.PersEmail FROM tblLodges LEFT JOIN tblOfficers ON tblLodges.lngLodgeID = tblOfficers.lngLodgeID WHERE tblLodges.intLodgeNumber=$id GROUP BY tblOfficers.lngOfficerTitleID LIMIT 0, 50")or die(mysql_error()); echo "<center>\n"; echo "<H2>Roster of Lodge Officers</H2>\n"; echo "<table border='1'> <tr> <th>Lodge Number</th> <th>Officer Title</th> <th>Officer First</th> <th>Officer Last</th> <th>Officer Email</th> <th>Officer Phone</th> </tr>"; if (mysql_num_rows($query)) { while ($row = mysql_fetch_array($query)) { $variable1=$row["intLodgeNumber"]; $variable2=$row["strOfficerTitle"]; $variable3=$row["strFirstName"]; $variable4=$row["strLastName"]; $variable5=$row["PersEmail"]; $variable6=$row["BusinessPhone"]; //table layout for results print("<tr>"); echo "<tr align=\"center\" bgcolor=\"#EFEFEF\">\n"; echo "<td class=\"td_id\">$variable1</td>\n"; echo "<td class=\"td_id\">$variable2</td>\n"; echo "<td class=\"td_id\">$variable3</td>\n"; echo "<td class=\"td_id\">$variable4</td>\n"; echo "<td class=\"td_id\">$variable5</td>\n"; echo "<td class=\"td_id\">$variable6</td>\n"; print("</tr>"); } } ?>
-
Actually - my situation is I've got about 300 addresses - for the sake of explanation, let's just say I have a company directory of 300 companies and a query that reports company pages. A company page would outline all sorts of company specific data. Within that data is an address, city, state, zip field.
I'm wanting to pull the address, city, state, zip from the database and then have a button or a link that says 'click here for driving directions'. I don't mind sending them to Google to type in their starting address, but the bigger issue (I think) with the code you provided is that the ending address always changes. Hope this makes sense..
-
OK- I'll give it a try and let you know... thanks
-
I've got a database that lists a variety of addresses and the database includes a text field for driving directions.
Has anybody taken database addresses and have a table return a link to Google's driving directions?
Thanks in advance for your time!
-
Perfect (and logical) - thank you very much.
-
My variable 4 works just fine...
-
its putting my website link in and then the email address:
-
I've attached a jpg screenshot - hopefully this is what you are looking for..?
[attachment deleted by admin]
-
sorry - you lost me. I'm self-teaching myself this stuff..
-
huh? is that a typo?
-
Does this look right to you guys? I'm seeing the email address returned, but its adding my website address in front of the email address.
$variable12=$row["Email"];
echo "<a href=\"$variable12\">Click Here To Email</a>";
-
Thanks craygo - works beautifully!
-
I'm not sure what you are asking...(newbie here)
Here is all of my php:
<?php $username = "username"; $password = "password"; $hostname = "localhost"; $dbhandle = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); $selected = mysql_select_db("dbb",$dbhandle) or die("Could not select dbb"); $id = $_POST['search']; echo "<p><H2>District Number:</b> $id</H2></p>"; $query = "SELECT a.strLodgeName, a.intLodgeNumber, a.intDistrictID, a.strLodgeMailingCity, a.strLodgeMailingPostCode, b.strDistrictName, b.strDistrictWebSite, c.strOfficerTitle, c.strFirstName, c.strLastName, c.OfficePhone, c.Email FROM tblDistricts AS b LEFT JOIN tblLodges AS a ON b.intDistrictID = a.intDistrictID LEFT JOIN DistrictOfficers AS c ON a.intDistrictID = c.intDistrictID WHERE b.intDistrictID='$id' GROUP BY c.strOfficerTitle LIMIT 5"; $result = mysql_query($query) or die(mysql_error()); echo "<p><H2>District Website:</H2> <a href=\"{$row['strDistrictWebSite']}\">{$row['strDistrictWebSite']}[/url]</p>"; echo "<table width=\"65%\" border=\"1\" bgcolor=\"#dddddd\">"; echo "<tr><td><B>District Officers<B></td><td><B>First Name<B></td><td><B>Last Name<B></td><td><B>Office Phone<B></td><td><B>Email<B></td></tr>"; while ( $row = mysql_fetch_array($result)) { echo "<tr><td>". $row['strOfficerTitle'] . "</td><td>" . $row['strFirstName'] . "</td><td>" . $row['strLastName'] . "</td><td>" . $row['OfficePhone'] . "</td><td><a href=\"mailto:{$row['Email']}\">{$row['Email']}</a></td></tr>";} echo "</table>"; ?>
-
Well, I tried and tried to work with what you provided to me without bugging you again.. but I got nowhere.
I get returned: [/url] (which is a link to my own site.)
Here is my code - I didn't want the URL link to be in the table, I wanted it to be alone and above it...
$result = mysql_query($query) or die(mysql_error()); echo "<p><H2>Website:</H2> <a href=\"{$row['strDistrictWebSite']}\">{$row['strDistrictWebSite']}[/url]</p>"; echo "<table width=\"65%\" border=\"1\" bgcolor=\"#EBECE4\">"; echo "<tr><td><B>District Officers<B></td><td><B>First Name<B></td><td><B>Last Name<B></td><td><B>Office Phone<B></td><td><B>Email<B></td></tr>"; while ( $row = mysql_fetch_array($result)) { echo "<tr><td>". $row['strOfficerTitle'] . "</td><td>" . $row['strFirstName'] . "</td><td>" . $row['strLastName'] . "</td><td>" . $row['OfficePhone'] . "</td><td><a href=\"mailto:{$row['Email']}\">{$row['Email']}</a></td></tr>";} echo "</table>"; ?>
-
Yes, that worked.. thanks!
So, if my 'Email' field was actually 'Website'.. would the following be accurate?
echo "<tr><td>". $row['strOfficerTitle'] . "</td><td>" . $row['strFirstName'] . "</td><td>" . $row['strLastName'] . "</td><td>" . $row['OfficePhone'] . "</td><td><a href=\"{$row['Website']}\">{$row['Website']}</a></td></tr>";
-
I don't think I plugged it in correctly because I get a blank page with this:
echo "<tr><td>". $row['strOfficerTitle'] . "</td><td>" . $row['strFirstName'] . "</td><td>" . $row['strLastName'] . "</td><td>" . $row['OfficePhone'] . "</td><td>" . <a href=\"mailto:{$row['Email']}\">{$row['Email']}[/url] . "</td></tr>";
Just bought some script - is it safe?
in PHP Coding Help
Posted
I don't know if you guys can help me with this or not...
I just bought some script for my client via PayPal.
It's a simple OptIn script for their newsletter. It allows them to manage it without going into MySQL.
However, I usually buy USA - this is from St. Vincent & the Grenadines (see their websites below)
I'm fairly new at all of this and most of the time I'm not sure what I'm looking at in the code.
I'm wondering if I need to be worried about their compromising my client's data.
The software was $37 and included four php files.
http://islandlimited.net
http://planenews.com
PGP Key: http://keskydee.com/gil.asc