Hello I am working on an open source Alumni script. I have run into a snag that maybe someone can help me with.
I have a database table setup with different fields such as First_Name, Middle_Name, Last_Name, Email, etc. When the person registers with the Alumni, he/she enters only the information they want (first and last name, however, are required). When a person visits the Alumni site they see a listing of all the people in the database ordered by lastname.
In order to print the page I query the database and retrieve all the information using mysql_fetch_array() in a while loop. What I would like to happen is that if the person entered an e-mail address, when they first registered, that their name be turned into a mailto link.
Currently I use a if(isset($email)) to make the mailto, where $email is the data stored in the Email column in the database. The problem is that every single name becomes a link, even if they did not enter a e-mail address. For the ones that did not enter an e-mail address the mailto link is blank (e.g <a href="mailto:">John Doe</a>).
Is there a way to display only the information entered for each person and nothing else? So that a person named Bill, who entered an e-mail address, can have his name become a mailto link and a person name John, who did not enter an e-mail address, have his name just displayed (no link)?
Thank you in advance. Please excuse the length of the post, I wanted to make myself clear, since it's quite a confusing problem.