Reputation: 11
I have a field call e-mails
in my application. Now inside this field I want to hold 2 email addresses.
When my webpage displays this field it should show as a hyperlink (with mailto) so when pressed it allows you to email directly.
E.g. the email
field value is [email protected], [email protected]
how can i 1.store the values as clickable links in one field? 2. Make sure they have the mailto syntax?
i tried storing the following in the email field but it wasnt correct
<a href="mailto:[email protected]">Email me</a>
Upvotes: 0
Views: 1099
Reputation: 76
I think you should not store multiple emails in one field, instead, make another table for emails corresponding to the person, means relate PersonID to EmailID.
So your table Person will contain information about person and a PersonID
(primary key) and table email will have EmailID
(primary key), emailAddress
and PersonID
, PersonID
being the foreign key.
Upvotes: 2