Re: mail function

From: Date: Wed, 07 Mar 2001 21:14:26 +0000
Subject: Re: mail function
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-7171@lists.php.net to get a copy of this message
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 <lbander@cisco.com> Para: <php-db@lists.php.net> 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: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.db (#7171) next »