Jump to content

nmrudolph

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Everything posted by nmrudolph

  1. kadeous, you are a god among men. It worked! Now I have to figure out how to add that into the email that gets generated, but that should be much more straightforward. Thank you so much!
  2. Tried that and all that showed up on the next page was a single period... [attachment deleted by admin]
  3. I tried changing to what you said but when I do the next page doesn't list anything in the URL. In order to use the $_GET function the first and last name would be posted there wouldn't it? I went ahead and tried these it anyway but nothing came up: <?php echo $_GET["name"]; ?> <?php echo $_GET['name=$state_row[state].&firstname=$state_row[first_name].&lastname=$state_row[last_name]']; ?>
  4. I have a page that reads from a database to list employees from different states. Under each name is a link that pulls up a new window with a contact form. My goal is to get the name from that link to appear on that new window. (Which I will then use to ultimately add the name into the email that was generated so the recipient can know who the email was intended for.) I've tried using the GET and POST methods but nothing seems to work. Any help would be appreciated greatly. I will name my firstborn after anything you desire. I've included my code below. (The last line is what I've been primarily working with) //Open Database Connection $db = open_db_connection(); $sql = "SELECT DISTINCT 1 from users where active = 'Y' and show_on_contactus = 'Y'"; $results = mysql_query($sql, $db); $emaillink = "<a target='main' onclick=window.open('contactform/contactCentral.php?name=$state_row[state]','popup','width=380,height=400,scrollbars=no,resizable=no,toolbar=yes,directories=no,location=no,menubar=yes,status=no,left=0,top=0'); return false>"; if(!mysql_num_rows($results) == FALSE) while($row = mysql_fetch_array($results, MYSQL_BOTH)) { echo "<ul id=\"directors\">\n"; $state_sql = "SELECT * from users where active = 'Y' and show_on_contactus = 'Y' and state_full = 'indiana' order by last_name"; $state_results = mysql_query($state_sql, $db); if(!mysql_num_rows($results) == FALSE) { while($state_row = mysql_fetch_array($state_results, MYSQL_BOTH)) { echo "<li>\n"; echo " <div class=\"fl dirimg\">\n"; if($state_row[photo] == "") { echo "<img border=\"0\" width=\"61\" height=\"85\" src=\"images/exe_placeholder.jpg\" alt=\"$state_row[first_name] $state_row[last_name]\" />\n"; } else { echo "<img border=\"0\" width=\"61\" height=\"85\" src=\"n2team/pictures/$state_row[photo]\" alt=\"$state_row[firstname] $state_row[last_name]\" />\n"; } echo " </div>\n"; echo " <span class=\"fr\">$state_row[first_name] $state_row[last_name]<br />\n"; echo " $state_row[title]<br />\n"; echo " $state_row[city], $state_row[state]<br />\n"; echo " $emaillink Contact $state_row[first_name] </a></span></li>\n"; }
  5. Thanks for such an in depth reply! Will try it this weekend
  6. I'm working on a site that has close to a hundred employees, each with an email address. They want me to add a feature to where people can contact these employees, without actually knowing their email address. To do that, I made a new window that pops up when they click to email someone, and it asks the user for their name, email address, and a short message. My problem is that the contact form is the same for every person. I don't know how to make that form direct to each individual person, without making each page by hand. (Something I don't want to do because there are so many and new employees being added all the time.) Thanks in advance to all you who are much wiser than I. Please let me know if you need more info or source code.
  7. I'm guessing this won't apply to anyone else's code, but I did figure out how to fix the problem. I just had to change the first "SELECT DISTINCT * ...." to "SELECT DISTINCT 1 ..." Then it only displayed one group of results rather than the 2.
  8. I'm working on a website that uses a database to display the employees from different states. Below is the code I'm using and everything works great, but I can't figure out why all the results are getting posted twice. I'm trying to isolate just one state so we can have a different contact page for each state. Thanks for any help! Please let me know if you need more information. (I'm attaching a screenshot of what's happening as well.) <? include "public/public_common.php"; //Open Database Connection $db = open_db_connection(); $sql = "SELECT DISTINCT state_full = 'california' from users where active = 'Y' and show_on_contactus = 'Y'"; $results = mysql_query($sql, $db); if(!mysql_num_rows($results) == FALSE) { while($row = mysql_fetch_array($results, MYSQL_BOTH)) { echo "<ul id=\"directors\">\n"; $state_sql = "SELECT * from users where active = 'Y' and show_on_contactus = 'Y' and state_full = 'california' order by last_name"; $state_results = mysql_query($state_sql, $db); if(!mysql_num_rows($results) == FALSE) { while($state_row = mysql_fetch_array($state_results, MYSQL_BOTH)) { echo "<li>\n"; echo " <div class=\"fl dirimg\">\n"; if($state_row[photo] == "") { echo "<img border=\"0\" width=\"61\" height=\"85\" src=\"images/exe_placeholder.jpg\" alt=\"$state_row[first_name] $state_row[last_name]\" />\n"; } else { echo "<img border=\"0\" width=\"61\" height=\"85\" src=\"n2team/pictures/$state_row[photo]\" alt=\"$state_row[firstname] $state_row[last_name]\" />\n"; } echo " </div>\n"; echo " <span class=\"fr\">$state_row[first_name] $state_row[last_name]<br />\n"; echo " $state_row[title]<br />\n"; echo " $state_row[city], $state_row[state]<br />\n"; //echo " <a href=\"mailto:$state_row[email]\">$state_row[email]</a></span></li>\n"; } } echo "</ul>\n"; } } ?> [attachment deleted by admin]
  9. That's exactly the kind of help I was looking for. I guess it's finally time for me to actually learn some java. Thanks!
  10. I'm not a new comer to web design, but to date all of my experience has been in content management based systems (Joomla, Wordpress etc...) I was recently approached by a client to add a page to his existing website and after some research I think that using Google Maps API would be the easiest way to implement what he needs. Basically he wants to have a map of the USA with an icon for each of his office locations. (There are about 70 across the states) Once clicked on, each of the locations will pop up with all the info for that office, and if there are any job openings there. I would like for it to be all in one page, dynamically changing as the user manipulates the map. I found the perfect example for this at ZipCar.com http://www.zipcar.com/nyc/find-cars Everything fits within one simple page, the user can zoom in and out, and all the pertinent information shows up with along the side without anything reloading. I was basically hoping someone could point me in the right direction as to the steps that would be needed to get this done. I don't want someone to hold my hand through the whole process, I'm just fairly new to PHP and HTML and wondering what all will be involved with completing a project like this. Consider my first born child yours for the person who can help me out with this...
×
×
  • 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.