Page 1 of 1

HELP make username an email link

Posted: Tue Feb 26, 2008 10:21 am
by Smedley
Hi guys,

I'm sure this is easy for a guru so here's what I want to do. The OUTPUT of my code reads as follows:

Username: jblow
Full Name: Joe Blow

How tough to make the username (in this case 'jblow') a link to his email (that would read 'jblow@company.org')? I suppose it's just a matter of adding the '@company.org' and telling it that the field is an email link.
The existing bit of code is shown below:

echo '<b>Username:</b>';
echo '</td><td>';
echo $row['Username'];
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td>';
echo '<b>Full Name:</b>';
echo '</td><td>';
echo $row['FullName'];

Thanks so much in advance!!

Re: HELP make username an email link

Posted: Tue Feb 26, 2008 10:26 am
by Smedley
BTW, the username 'jblow' can still display the same (as 'jblow'), it just needs to act as a hyperlink to his email. Hope that clarifies!

Thanks!!

Re: HELP make username an email link

Posted: Tue Feb 26, 2008 10:34 am
by Zoxive
Uhh..

Code: Select all

echo '<a href="mailto:' . $row['Username'] . '@company.org">' . $row['Username'] . '</a>';

Re: HELP make username an email link

Posted: Tue Feb 26, 2008 2:30 pm
by Smedley
I'll take any help without regard to heaping spoonfuls of condescension :D

Tried this and it returns my page as a blank. If someone has time can you cut/paste the correct code into my provided code - Will be a good learning experience to have the side-by-side comparison...

Thanks again for sharing the knowledge!!