no, no es eso lo que decia
digo en la misma pagina te pongo el codigo
seria segun se seleccione arriba marcar de la lista generada abajo. Algo me dice que tengo que hacerlo con javascript.
Código PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#EBECFE">
<form name="form1" method="post" action="">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="0%"> </td>
<td width="0%"> </td>
<td width="5%"> </td>
<td width="55%"> </td>
<td width="0%"> </td>
<td width="4%"> </td>
<td width="36%"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><strong>Para:</strong></td>
<td><input name="direcciones" type="text" id="direcciones" size="85"></td>
<td> </td>
<td><div align="center"><font color="#0000FF"><strong><<</strong></font></div></td>
<td><select name="listado" id="listado">
<option value="Todos">Seleccionar Manualmente</option>
<option value="Adminis">Seleccionar Administradores</option>
<option value="Alumnos">Seleccionar Alumnos</option>
<option value="Profesores">Seleccionar Profesores</option>
</select></td>
</tr>
<tr>
<td><font size="-7"> </font></td>
<td> </td>
<td><font size="-7"> </font></td>
<td><font size="-7"> </font></td>
<td> </td>
<td> </td>
<td><font size="-7"> </font></td>
</tr>
<tr>
<td> </td>
<td>:</td>
<td><strong>Asunto</strong></td>
<td><input name="asunto" type="text" id="asunto" size="85"></td>
<td> </td>
<td> </td>
<td rowspan="3" valign="top">
<select name="correo" size="20" multiple id="correo">
<?
$NombreBD = "PFC";
$Servidor = "localhost";
$Usuario = "root";
$Clave ="";
$i = 1;
if (! @$conexion=mysql_connect("localhost"))
{
print "¡¡Ha ocurrido un Error!!";
print "<br>";
print "Codigo del error: ".mysql_error();
print "<br>";
print "Por favor intentelo mas tarde o contacte con el administrador.";
print "<br>";
print "Disculpe las molestias.";
}
else
{
$Conexion = mysql_connect("$Servidor", "$Usuario", "$Clave") or die("No se pudo conectar a la base ");
mysql_select_db($NombreBD, $Conexion);
$array_categoria = array();
$operacion = "select apellidos, nombre, email, tipo from usuario order by tipo, apellidos, nombre";
$Consulta = mysql_query($operacion, $Conexion) or die("error en la consulta SQL");
while ($row = mysql_fetch_array ($Consulta))
{
print '<option value="'.$row[2].'">'.$row[0].', '.$row[1].'</option>';
}
}
?>
</select>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td><textarea name="cuerpo" cols="65" rows="20" id="cuerpo"></textarea></td>
<td> </td>
<td> </td>
</tr>
</table>
</form>
</body>
</html>