Código PHP:
<script languaje="javascript">
function validar(form)
{
if (form.Funcionarios.options[form.Funcionarios.selectedIndex].value == 0)
{
alert("Por favor, seleccione una opción válida");
form.Funcionarios.focus(); return true;
}
form.submit();
}
</script>
</head>
<link href="Estilos/equipos.css" rel="stylesheet" type="text/css">
<body bgcolor="#E2E2E2">
<?php
include("conex.php");
$link=Conectarse();
?>
<table width="650" border="1" >
<!--DWLayoutTable-->
<tr>
<td width="650" height="20" valign="top" bgcolor="#99CC33">
<div align="center"><font color="#FF6600" size="3" face="Courier New, Courier, mono"><strong>.:INGRESE
PROBLEMAS:.</strong></font></div></td>
</tr>
</table>
<table width="650" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<form name="form4" method="post" action="ProblemasProcesar.php">
<tr>
<td height="12" colspan="17" valign="top" bgcolor="#CCCC33"><strong><em>Información
Del Usuario</em></strong></td>
</tr>
<tr>
<td width="30" height="7"></td>
<td width="60"></td>
<td width="2"></td>
<td width="125"></td>
<td width="22"></td>
<td width="2"></td>
<td width="1"></td>
<td width="10"></td>
<td width="27"></td>
<td width="36"></td>
<td width="16"></td>
<td width="24"></td>
<td width="1"></td>
<td width="107"></td>
<td width="34"></td>
<td width="135"></td>
<td width="18"></td>
</tr>
<tr>
<td height="20"></td>
<td></td>
<td></td>
<td colspan="3" valign="top"> <select name="Funcionarios" id="Rut_Asignado">
<option value="" >Elija el Rut</option>
<?php
$result=mysql_query("SELECT * FROM Funcionarios",$link);
while($row=mysql_fetch_array($result))
echo ('<option value="'.$row["Rut_Asignado"].'">'.$row["Rut_Asignado"].'</option>');
?>
</select> </td>
</tr>
<tr>
<td height="48"></td>
</tr>
<tr>
<td height="12" colspan="17" valign="top" bgcolor="#CCCC33"><strong><font color="#000000" size="1">
<em>Problema</em></font></strong></td>
</tr>
<tr>
<td height="6"></td>
</tr>
<tr>
<td height="4"></td>
<td></td>
<td></td>
<td colspan="3" rowspan="3" valign="top"> <select name="Prioridad" id="Prioridad" >
<option>Elija Prioridad</option>
<option>Bajo</option>
<option>Mediano</option>
<option>Alto</option>
</select> </td>
<td colspan="2" rowspan="3" valign="top"> <select name="Estado" id="Estado">
<option>Elija Estado</option>
<option>Abierto</option>
<option>En Progreso</option>
<option>No Asignado</option>
<option>Respuesta en Espera</option>
</select> </td>
<td></td>
<td></td>
</tr>
<tr>
<td height="12"></td>
<td valign="top"><strong><font color="#000000" size="1">Prioridad:</font></strong></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td colspan="3" valign="top"><strong>Estado:</strong></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="4"></td>
</tr>
<tr>
<td height="20"> </td>
<td></td>
<td></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="12" colspan="17" valign="top" bgcolor="#CCCC33"><strong><em>Información
Del Problema</em></strong></td>
</tr>
<tr>
<td height="14"></td>
</tr>
<tr>
<td height="4"></td>
<td></td>
<td></td>
<td rowspan="3" valign="top"> <select name="Sistema" id="Sistema" >
<option>Eliga la Opción</option>
<option>Win XP Profesional</option>
</select> </td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td colspan="2" rowspan="3" valign="top"> <select name="Categoria" id="Categoria" >
<option>Elija Categoría</option>
<option>Sist. Operativo</option>
<option>Hadware</option>
<option>Software</option>
<option>Config. Web</option>
<option>Otro</option>
</select> </td>
<td></td>
<td></td>
</tr>
<tr>
<td height="12"></td>
<td valign="top"><strong>S. O.:</strong></td>
<td colspan="2" valign="top"><strong>Categoría:</strong></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="4"></td>
</tr>
<tr>
<td height="16"></td>
</tr>
<tr>
<td height="2"></td>
<td rowspan="2" valign="top"><strong>Descripción:</strong></td>
<td></td>
<td colspan="11" rowspan="4" valign="top"> <input name="Descripcion" type="text" id="Descripcion" size="70" maxlength="90">
</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="10"></td>
<td></td>
<td colspan="2" rowspan="2" valign="top"><font color="#FF0000"><strong>Máx.
70 Caracteres</strong></font></td>
<td></td>
</tr>
<tr>
<td height="2"></td>
<td rowspan="3" valign="top"><div align="center"><font color="#FF0000"><strong>(Corta)</strong></font></div></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="3"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="7"></td>
<td></td>
</tr>
<tr>
<td height="20"></td>
<td> </td>
</tr>
<tr>
<td height="2"></td>
<td rowspan="3" valign="top"><strong>Nº Error:</strong></td>
<td></td>
<td colspan="4" rowspan="3" valign="top"> <input name="Error" type="text" id="Error" size="30">
</td>
</tr>
<tr>
<td height="12"></td>
<td></td>
<td></td>
<td colspan="3" valign="top"><strong><font color="#FF0000">Opcional</font></strong></td>
</tr>
<tr>
<td height="3"></td>
<td></td>
</tr>
<tr>
<td height="24"></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="22"></td>
<td> </td>
<td></td>
<td></td>
<td></td>
<td colspan="5" valign="top"> <input name="Ingresar" type="submit" id="Ingresar" value="Ingresar" onClick="validar(this.form)">
</td>
<td> </td>
</tr>
</form>
</table>