gk20 Posted March 16, 2006 Share Posted March 16, 2006 I'm outputting a user's name and contact email address eg. Username: adminiistrator Email: example@domain.comInstead I would prefer to just have the user's username as a link to their email?How is this possible?Or perhaps as a link so that a popup will appear with users email and phone number??I tried the link something like this - <a href="mailto:$email">$user</a>where $email is the result of a query - $email = $row['Email'] and $user is similar - $user = $row['username'];Ideally id like to see both options above to see which one looks best, but if i could get helpwith either that would be great?Thanks!!!!! Quote Link to comment Share on other sites More sharing options...
shocker-z Posted March 16, 2006 Share Posted March 16, 2006 useecho("<a href=\"mailto:$email\">$user</a>");That should work as long as the values are set correctly :) Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted March 16, 2006 Share Posted March 16, 2006 Or you could use:[code]<?phpecho '<a href="mailto:' . $email . '">' . $user . '</a>';/>[/code]Which does the same thing, but is easier to readKen Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.