Jump to content

e-mail link called from database is appending url info - why?


scotch33

Recommended Posts

In this code - 

<td class="detailanswer"><a href=<? echo "'".$row['cust_email']."'"; ?>><? echo $row['cust_email']; ?></a></td>

the address user@userdomain.com shows in the display but the actual link becomes
http://mydomain.co.uk/user@userdomain.com

any ideas why the domain url is getting added before the e-mail link?
Link to comment
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.