PHP - Habilita

 
Vista:

Habilita

Publicado por Ericsonr y Deshabilitar combox (14 intervenciones) el 27/08/2013 23:24:05
Hola de nuevo, Necesito tu ayuda en habilitar y deshabilitar combos... Tengo mi archivo index.php y en el tengo para ingresar Usuario, Clave, y seleccionar si es administrador o almacenero y la sede en la ual el ingresa pero si yo selecciono administrador debe deshabilitarse la opcion de combo de Sede.
Gracias de antemano espro me peudas ayuadr pero necesito que me coloques el codigo porfavor.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?php
$tipo="select * from cargo";
$resultado2=mysql_query($tipo);
$tipo1="select * from departamento";
$resultado3=mysql_query($tipo1);
?>
 
<form  id=frmDatos action="validar.php" method="post" onSubmit="return ValidaMiForm()">
 
<table  cellSpacing=0 cellPadding=0 BORDER=0 ALIGN=CENTER width=60%>
 
<tr>
 
<td colspan=3 valign=top align=center>
  <h3><strong>ACCESO AL SISTEMA</strong></h3>
  <br>
</td>
 
 
 
<tr align="left" valign="center">
 
<TD ><img src="modulo.png" width="55" height="40" border="0"> </TD>
<td align=left width=80  ><b>Modulo:</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td width="100" align=left >
<select name="cargo" >
<option value="">--Seleccione--</option>
<?php while($filas=mysql_fetch_array($resultado2)){?>
<option value="<?php echo $filas['id_cargo']?>"><?php echo $filas['cargo']
?>
</option>
<?php
 }
 ?>
 </select>
 
</td>
 
</tr>
 
<tr align="left" valign="center">
 
<TD ><img src="sede.png" width="55" height="40" border="0"> </TD>
<td align=left width=80  ><b>Sede:</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td>
<td width="100" align=left >
<select name="depa" >
<option value="">--Seleccione--</option>
<?php while($filas=mysql_fetch_array($resultado3)){?>
<option value="<?php echo $filas['id_dep']?>"><?php echo $filas['departamento']
?>
</option>
<?php
 }
 ?>
 </select>
 
</td>
 
</tr>
 
<tr align="left" valign="center">
 
<TD ><img src="usu.png" width="55" height="60" border="0"> </TD>
<td align=left width=80  >
<br>
<b>Usuario:</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td>
<td width="100" align=left >
<input class="cajatextode" name="usuario" size=27 type="text"/>
</td>
 
</tr>
 
<tr>
<TD ><img src="candado.png" width="55" height="60" border="0"> </TD>
<td align=left width=80>
 <br>
<b>Paswoord:</b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</td>
<td align=left >
<input class="cajatextode" name="clave" size=27 type="password" />
</td>
 
</tr>
 
<tr>
<td width="100"  >&nbsp; </td>
 
<td  colspan=2 align=center >
<input class="usuario" type="submit" value="Ingresar" />
</td>
 
</tr>
 
 
</table>
 
</form>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder