Ver Mensaje Individual
  #2 (permalink)  
Antiguo 03/04/2012, 01:28
cheterporras2
 
Fecha de Ingreso: octubre-2011
Mensajes: 160
Antigüedad: 12 años, 6 meses
Puntos: 2
Respuesta: redireccionar según opción elegida en formulario

El formulario(he quitado códigos de seguridad):
Código PHP:
<?php include("registrandose.php"?>
<html>
<head>
</head>
<body class="fondoregistro">
<form action="registro.php" method="post" enctype="multipart/form-data" name="form" id="form">
  <table width="1024" height="768" border="0">
    <tr>
      <td width="304" height="768"><table width="100%" height="618" border="0">
        <tr>
          <td height="350" colspan="2"><img src="images/cancelar.png" alt="" width="<?php if($error_img=='error'){echo '60';}else{echo '0';} ?>" height="<?php if($error_img=='error'){echo '60';}else{echo '0';} ?>" class="xsubir" /></td>
        </tr>
        <tr>
          <td width="84%" height="46">
          <label for="imagen"></label>
            <input name="imagen" type="file" class="subirfoto"  id="imagen" value="<?php echo $_FILES['imagen']['tmp_name']; ?>" size="12" />
            </td>
          <td width="16%"><input name="button" type="submit"  class="botonenvio" id="button" value="Enviar" /></td>
        </tr>
        <tr>
          <td height="148" colspan="2"><span class="style2"><?php echo $error?></span></td>
        </tr>
      </table></td>
      <td width="335"><table width="100%" height="768" border="0">
        <tr>
          <td height="103">&nbsp;</td>
        </tr>
        <tr>
          <td height="60"><label for="pais"></label>
            <input name="pais" type="text" class="pais" id="pais" value="<?php echo $_POST["pais"] ; ?>" maxlength="40" /></td>
        </tr>
        <tr>
          <td height="21" class="imagenx"><?php if($error_prov=='error'){echo '<span style=color:red>erraste';}else{echo '<span style=color:green> acertaste';} ?></td>
        </tr>
        <tr>
          <td height="52"><label for="provincia"></label>
            <input name="provincia" type="text" class="provincia" id="provincia" value="<?php echo $_POST["provincia"] ; ?>" maxlength="40" /><img src="images/cancelar.png" alt="" width="<?php if($error_prov=='error'){echo '30';}else{echo '0';} ?>" height="<?php if($error_prov=='error'){echo '30';}else{echo '0';} ?>" /></td>
        </tr>
        <tr>
          <td height="15">&nbsp;</td>
        </tr>
        <tr>
          <td height="57"><label for="ciudad"></label>
            <input name="ciudad" type="text" class="ciudad" id="ciudad" value="<?php echo $_POST["ciudad"] ; ?>" maxlength="40" /></td>
        </tr>
        <tr>
          <td height="5">&nbsp;</td>
        </tr>
        <tr>
          <td height="45"><label for="zona"></label>
            <input name="zona" type="text" class="zona" id="zona"value="<?php echo $_POST["zona"] ; ?>" maxlength="40" /></td>
        </tr>
        <tr>
          <td height="21"> </td>
        </tr>
        <tr>
          <td height="50"><label for="especie"></label>
          <select name="especie" class="especie" id="sexo">
<option value="perro" <?php if (!(strcmp("perro"$_POST["especie"]))) {echo "selected=\"selected\"";} ?>>perro</option>
<option value="gato" <?php if (!(strcmp("gato"$_POST["especie"]))) {echo "selected=\"selected\"";} ?>>gato</option>
<option value="otro" <?php if (!(strcmp("otro"$_POST["especie"]))) {echo "selected=\"selected\"";} ?>>otro</option>
            </select>
           </td>
        </tr>
        <tr>
          <td height="15" class="imagenx"><?php if($error_raza=='error'){echo '<span style=color:red>erraste';}else{echo '<span style=color:green> acertaste';} ?></td>
        </tr>
        <tr>
          <td height="57"><label for="raza"></label>
            <input name="raza" type="text" class="raza" id="raza" value="<?php echo $_POST["raza"] ; ?>" maxlength="40" /><img src="images/cancelar.png" alt="" width="<?php if($error_raza=='error'){echo '30';}else{echo '0';} ?>" height="<?php if($error_raza=='error'){echo '30';}else{echo '0';} ?>" /></td>
        </tr>
        <tr>
          <td height="5" class="imagenx"><?php if($error_edad=='error'){echo '<span style=color:red>erraste';}else{echo '<span style=color:green> acertaste';} ?></td>
        </tr>
        <tr>
          <td height="45"><label for="edad"></label>
            <input name="edad" type="text" class="edad" id="edad" onkeyUp="return ValNumero(this);" value="<?php echo $_POST["edad"] ; ?>" maxlength="3" /><img src="images/cancelar.png" alt="" width="<?php if($error_edad=='error'){echo '30';}else{echo '0';} ?>" height="<?php if($error_edad=='error'){echo '30';}else{echo '0';} ?>" /></td>
        </tr>
        <tr>
          <td height="15">&nbsp;</td>
        </tr>
        <tr>
          <td height="61"><label for="sexo"></label>
            <select name="sexo" class="sexo" id="sexo">
<option value="hembra" <?php if (!(strcmp("hembra"$_POST["sexo"]))) {echo "selected=\"selected\"";} ?>>hembra</option>
<option value="macho" <?php if (!(strcmp("macho"$_POST["sexo"]))) {echo "selected=\"selected\"";} ?>>macho</option>
            </select></td>
        </tr>
        <tr>
          <td height="46">&nbsp;</td>
        </tr>
      </table></td>
      <td width="371"><table width="100%" height="768" border="0">
        <tr>
          <td height="103" colspan="2">&nbsp;</td>
        </tr>
        <tr>
          <td width="43%" height="60"><input name="pedigri" type="radio" class="si" id="radio" value="si" <?php if (!(strcmp("si"$_POST["pedigri"]))) {echo "selected=\"selected\"";} ?> checked="checked" />
            <label for=""></label></td>
          <td width="57%"><input name="pedigri" type="radio" class="no" id="radio2" value="no" <?php if (!(strcmp("no"$_POST["pedigri"]))) {echo "selected=\"selected\"";} ?> />
            <label for="radio2"></label></td>
        </tr>
        <tr>
          <td height="21" colspan="2">&nbsp;</td>
        </tr>
        <tr>
          <td height="52" colspan="2"><label for="capa"></label>
            <input name="capa" type="text" class="capa" id="capa" value="<?php echo $_POST["capa"] ; ?>" maxlength="20" /></td>
        </tr>
        <tr>
          <td height="15" colspan="2" class="imagenx"><?php if($error_amo=='error'){echo '<span style=color:red>erraste';}else{echo '<span style=color:green> acertaste';} ?></td>
        </tr>
        <tr>
          <td height="57" colspan="2"><label for="nombreamo"></label>
            <input name="nombreamo" type="text" class="nombreamo" id="nombreamo" value="<?php echo $_POST["nombreamo"] ; ?>" maxlength="30" />
            <img src="images/cancelar.png" width="<?php if($error_amo=='error'){echo '30';}else{echo '0';} ?>" height="<?php if($error_amo=='error'){echo '30';}else{echo '0';} ?>" /></td>
        </tr>
        <tr>
          <td height="5" colspan="2" class="imagenx"><?php if($error_tel=='error'){echo '<span style=color:red>erraste';}else{echo '<span style=color:green> acertaste';} ?></td>
        </tr>
        <tr>
          <td height="45" colspan="2"><label for="telefono"></label>
            <input name="telefono" type="text" class="telefono" id="telefono" onkeyUp="return ValNumero(this);" value="<?php echo $_POST["telefono"]; ?>" maxlength="15" /><img src="images/cancelar.png" alt="" width="<?php if($error_tel=='error'){echo '30';}else{echo '0';} ?>" height="<?php if($error_tel=='error'){echo '30';}else{echo '0';} ?>" /></td>
        </tr>
        <tr>
          <td height="21" colspan="2" class="imagenx"><?php if($error_email=='error'){echo '<span style=color:red>erraste';}else{echo '<span style=color:green> acertaste';} ?></td>
        </tr>
        <tr>
          <td height="50" colspan="2"><label for="email"></label>
            <input name="email" type="text" class="email" id="email" value="<?php echo $_POST["email"] ; ?>" maxlength="35" /><img src="images/cancelar.png" alt="" width="<?php if($error_email=='error'){echo '30';}else{echo '0';} ?>" height="<?php if($error_email=='error'){echo '30';}else{echo '0';} ?>" /></td>
        </tr>
        <tr>
          <td height="15" colspan="2" class="imagenx"><?php if($error_user=='error'){echo '<span style=color:red>erraste';}else{echo '<span style=color:green> acertaste';} ?></td>
        </tr>
        <tr>
          <td height="57" colspan="2"><label for="usuario"></label>
            <input name="usuario" type="text" class="usuario" id="usuario" value="<?php echo $_POST["usuario"] ; ?>" maxlength="40" /><img src="images/cancelar.png" alt="" width="<?php if($error_user=='error'){echo '30';}else{echo '0';} ?>" height="<?php if($error_user=='error'){echo '30';}else{echo '0';} ?>" /></td>
        </tr>
        <tr>
          <td height="5" colspan="2" class="imagenx"><?php if($error_contr=='error'){echo '<span style=color:red>erraste';}else{echo '<span style=color:green> acertaste';} ?></td>
        </tr>
        <tr>
          <td height="45" colspan="2"><label for="contrasenna"></label>
            <input name="contrasenna" type="password" class="contrasena" id="contrasenna" value="<?php echo $_POST["contrasenna"]; ?>" onclick='contrasenna.value=""' maxlength="25" /><img src="images/cancelar.png" alt="" width="<?php if($error_contr=='error'){echo '30';}else{echo '0';} ?>" height="<?php if($error_contr=='error'){echo '30';}else{echo '0';} ?>" /></td>
        </tr>
        <tr>
          <td height="15" colspan="2" class="imagenx"><?php if($error_repcontr=='error'){echo '<span style=color:red>erraste';}else{echo '<span style=color:green> acertaste';} ?></td>
        </tr>
        <tr>
          <td height="61" colspan="2"><label for="repcontrasenna"></label>
            <input name="repcontrasenna" type="password" class="repcontrasenna" id="repcontrasenna" value="<?php echo $_POST["contrasenna"]; ?>" onclick='repcontrasenna.value=""' maxlength="25" /><img src="images/cancelar.png" alt="" width="<?php if($error_repcontr=='error'){echo '30';}else{echo '0';} ?>" height="<?php if($error_repcontr=='error'){echo '30';}else{echo '0';} ?>" /></td>
        </tr>
        <tr>
          <td height="46" colspan="2">&nbsp;</td>
        </tr>
      </table></td>
    </tr>
  </table>
</form>
</body>
</html>