You can't have links in a selection list you have to use another interface
object like anchor tags (<A>)
while(){
echo("<A HREF='mailto:'".$row["emailaddress"]."'>Link description</A>");
}
HTH
Jayme.
-----Mensagem Original-----
De: Liz Bander <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: quarta-feira, 7 de março de 2001 15:03
Assunto: [PHP-DB] mail function
> 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
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]