scotch33 Posted November 8, 2006 Share Posted November 8, 2006 In this code - <td class="detailanswer"><a href=<? echo "'".$row['cust_email']."'"; ?>><? echo $row['cust_email']; ?></a></td>the address [email protected] shows in the display but the actual link becomes http://mydomain.co.uk/[email protected]any ideas why the domain url is getting added before the e-mail link? Link to comment https://forums.phpfreaks.com/topic/26586-e-mail-link-called-from-database-is-appending-url-info-why/ Share on other sites More sharing options...
Cep Posted November 8, 2006 Share Posted November 8, 2006 Firstly I have to ask why your code is the way it is? Whats the [/url] bbcode doing in there for a start?Are you sure that the data within cust_email is correct?Also why are you not including the mailto: part of the HTML?[code=php:0]<td class="detailanswer"><a href="mailto:<? echo {$row['cust_email']}; ?> ><? echo {$row['cust_email']}; ?></a></td>[/code] Link to comment https://forums.phpfreaks.com/topic/26586-e-mail-link-called-from-database-is-appending-url-info-why/#findComment-121624 Share on other sites More sharing options...
php_joe Posted November 8, 2006 Share Posted November 8, 2006 Don't forget both double quotes:[code]<td class="detailanswer"><a href="mailto:<? echo {$row['cust_email']}; ?>" ><? echo {$row['cust_email']}; ?></a></td>[/code] Link to comment https://forums.phpfreaks.com/topic/26586-e-mail-link-called-from-database-is-appending-url-info-why/#findComment-121642 Share on other sites More sharing options...
moore82 Posted November 8, 2006 Share Posted November 8, 2006 joe's got it. Link to comment https://forums.phpfreaks.com/topic/26586-e-mail-link-called-from-database-is-appending-url-info-why/#findComment-121646 Share on other sites More sharing options...
Cep Posted November 9, 2006 Share Posted November 9, 2006 LOL yes always be on the lookout for typos ;) Link to comment https://forums.phpfreaks.com/topic/26586-e-mail-link-called-from-database-is-appending-url-info-why/#findComment-122059 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.