mail function
| From: | Liz Bander | Date: | Wed, 07 Mar 2001 18:03:51 +0000 |
| Subject: | mail function | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-7164@lists.php.net to get a copy of this message | ||
I need to make an email link in a table. The username is displayed as text; I need it to be a link through which I can send email. Is this possible in php? The following is the code for that I'm using:
function show_logged_users($user) {
$query = "select distinct uid, cn from log left join ldap.ldap on log.user like ldap.ldap.uid order by ldap.ldap.sn";
connect();
$result = mysql_query($query);
if (($result) && (mysql_num_rows($result) > 0)) {
while ($line = mysql_fetch_row($result)) {
$opts[$line[0]] = $line[1];
}
} else {
$opts[0] = "Error in show_logged_users()";} show_select($opts, $user); } <td>
<font face="Arial, Helvetica, sans-serif" size="-1" color="#FFFFFF"><b>User</b></font></td> <td>
<select name="user">
<? show_logged_users($user) ?>
</select>
</td>
What I need is the <? show_logged_users($user) ?> statement to turn itself into a mailto: statement to that clicking on the user name will bring up an email addressed to username @domain.com Is this possible? Is there any code out there that I can get a look at?
Thanks,
Liz