<?php
$query_getf = "select ci.tb_ci_id, concat(ci.tb_ci_fname, ' ',   ci.tb_ci_lname),ci.tb_ci_city, ct.tb_ct_desc, md5(ci.tb_ci_id), s.tb_s_name_full, case ci.tb_ci_addr_2 when '' then 
ci.tb_ci_addr_1 else concat(ci.tb_ci_addr_1, ', ', ci.tb_ci_addr_2) end, ci.tb_ci_phone_1, ci.tb_ci_phone_2, ci.tb_ci_fax, ci.tb_ci_email FROM tb_contact_info ci, tb_contact_type ct, tb_states s WHERE md5(ci.tb_p_id)='".$fd_p_d['md5_id']."' AND ci.tb_ct_id=ct.tb_ct_id AND ci.tb_s_id=s.tb_s_id ORDER BY ct.tb_ct_desc, ci.tb_ci_date_added";

//print $query_getf;

$sth_getf = mysql_query($query_getf);

if ($arr_getf = mysql_fetch_array($sth_getf)) {

    print '

     <td colspan="4" align="left" valign="top">

       <table width="100%" border="0" cellpadding="1" cellspacing="1">
  ';

          do {
               print '
               <tr>
          <td align="left" valign="top" class="text-11">                                      

This email is not showing up as a hyperlink. Any suggestions or ideas?

                  Email: '.$arr_getf[10].'
                                      </td>
                                <tr>
      <td colspan="4"><hr /></td>
</tr>
        ';
}while($arr_getf = mysql_fetch_array($sth_getf));
                                print '

        </table>
   </td>
 ';
}
else {

I would not suggest showing E-Mail addresses at all ever on a website as these can be picked up by less than wholesome people :)

But if you really want to do this, echo an add the a mailto to the code around the email address.

I would not suggest showing E-Mail addresses at all ever on a website as these can be picked up by less than wholesome people :)

But if you really want to do this, echo an add the a mailto to the code around the email address.

To create an email link, you use the protocol, mailto:

eg:

<a href="mailto:user@example.com">user@example.com</a>

http://www.w3.org/TR/WD-html40-970708/htmlweb.html

You could also add a subject, see link.

Member Avatar for Rhyan

Well, here you should do some coding before printing the contents:...

//this is where you need to intervene

if ($arr_getf = mysql_fetch_array($sth_getf)) {
 
    print '....'

instead, do it like this

$result = mysql_fetch_assoc($sth_getf);
if(isset($result) && if_key_exists('tb_ci_email', $result))
  {
  $newemail = '<a href="mailto:'.$result['tb_ci_email'].'">'.$result['tb_ci_email'].'</a>';
  $result['tb_ci_email'] =$newemail;
  reset($result);
  }
if($result)
  {
   print( '
 
     <td colspan="4" align="left" valign="top">
 
       <table width="100%" border="0" cellpadding="1" cellspacing="1">
  ';
 
          do {
               print '
               <tr>
	      <td align="left" valign="top" class="text-11">	.....');
  }

Hope it works for you. Once you have it set, please tell us the result.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.