Código PHP:
<form name="form" action="usuarios2.php" method="POST" enctype="multipart/form-data">
<table class="table table-hover">
<tr>
<td>Nick:</td>
<td><input type="text" name="nick" placeholder="Ingrese nick" required></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="password" placeholder="Ingrese password" required></td>
</tr>
<tr>
<td>Repita password:</td>
<td><input type="password" name="password2" placeholder="Repita password" required> </td>
</tr>
<tr>
<td>Rol a delegar:</td>
<td>
<select name="departamento" required>
<option>Seleccione Rol</option>
<?php
$query_dep = mysql_query("select * from roles");
while ($datos = mysql_fetch_row($query_dep)) {
# code...
echo '<option name="'.$datos[0].'">';
echo $datos[1].'</option>';
}
?>
</select>
</td>
</tr>
<tr>
<td>Correo:</td>
<td><input type="email" name="correo" placeholder="Ingrese correo" onClick="this.value=''" style="" required> </td>
</tr>
<tr>
<td>Imagen Perfil:</td>
<td><input type="file" name="foto"></td>
</tr>
</table>
<button type="submit" >Crear Usuario</button>
</form>
Código PHP:
if ( ($type == 'image/jpeg' || $type == 'image/jpg' || $type == 'image/gif' || $type == 'image/png') && ($size <= $max_size) && ($ext == 'jpeg' || $ext == 'jpg' || $ext == 'gif' || $ext == 'png') ) {
# code...
Podrian ayudarme porfa!