Ver Mensaje Individual
  #5 (permalink)  
Antiguo 18/07/2013, 00:09
rbczgz
 
Fecha de Ingreso: noviembre-2003
Ubicación: Zaragoza, España
Mensajes: 1.257
Antigüedad: 20 años, 5 meses
Puntos: 154
Respuesta: Problema con recaptcha y paso de variables POST

Gracias por tu respuesta, pateketrueke, tienes razón, es difícil leer la mente

EL tema es que no hay mucho más que mostrar, es decir, si solo he puesto esto es para no llenar el post con código que, al fin y al cabo, no tiene mucho que ver con el tema en cuestión, son validaciones y demás, pero en fin, espero que me quepa todo, ahí va...

Archivo form.php

Código PHP:
Ver original
  1. <script type="text/javascript">
  2. var RecaptchaOptions = {
  3.    lang : 'es',
  4. };
  5. </script>
  6. <div align="center">
  7. <table border="0" cellpadding="0" style="border-collapse: collapse; background-color:#FFFFFF; width: 750px;">
  8. <tr>
  9. <td align="center" colspan="2">Registro</td>
  10. </tr>
  11. <tr>
  12. <form name="alta" id="alta" action="" method="post">
  13. <td>Nombre:</td>
  14. <td><input type="text" id="nombre" name="nombre" size="30" maxlength="70" value="<?php if (isset($_POST['nombre'])) { echo $_POST['nombre']; } ?>" tabindex="2"></td>
  15. </tr>
  16. <tr>
  17. <td>Apellidos:</td>
  18. <td><input type="text" id="apellidos" name="apellidos" size="50" maxlength="70" value="<?php if (isset($_POST['apellidos'])) { echo $_POST['apellidos']; } ?>" tabindex="3"></td>
  19. </tr>
  20. <tr>
  21. <td>N.I.F.:</td>
  22. <td><input type="text" id="nif" name="nif" size="10" maxlength="9" value="<?php if (isset($_POST['nif'])) { echo $_POST['nif']; } ?>" tabindex="4"></td>
  23. </tr>
  24. <tr>
  25. <td>E-mail:</td>
  26. <td><input type="text" id="email" name="email" size="50" maxlength="70" value="<?php if (isset($_POST['email'])) { echo $_POST['email']; } ?>" tabindex="5"></td>
  27. </tr>
  28. <tr>
  29. <td>Teléfono fijo:</td>
  30. <td><input type="text" id="telefono_fijo" name="telefono_fijo" size="12" maxlength="15" value="<?php if (isset($_POST['telefono_fijo'])) { echo $_POST['telefono_fijo']; } ?>" tabindex="6"></td>
  31. </tr>
  32. <tr>
  33. <td>Teléfono móvil:</td>
  34. <td><input type="text" id="telefono_movil" name="telefono_movil" size="12" maxlength="15" value="<?php if (isset($_POST['telefono_movil'])) { echo $_POST['telefono_movil']; } ?>" tabindex="7"></td>
  35. </tr>
  36. <tr>
  37. <td>Dirección:</td>
  38. <td><input type="text" id="direccion" name="direccion" size="60" maxlength="70" value="<?php if (isset($_POST['direccion'])) { echo $_POST['direccion']; } ?>" tabindex="8"></td>
  39. </tr>
  40. <tr>
  41. <td>Código Postal:</td>
  42. <td><input type="text" name="codigo_postal" size="5" maxlength="10" value="<?php if (isset($_POST['codigo_postal'])) { echo $_POST['codigo_postal']; } ?>" tabindex="9"></td>
  43. </tr>
  44. <tr>
  45. <td>Localidad:</td>
  46. <td><input type="text" id="localidad" name="localidad" size="40" maxlength="70" value="<?php if (isset($_POST['localidad'])) { echo $_POST['localidad']; } ?>" tabindex="10"></td>
  47. </tr>
  48. <tr>
  49. <td>Provincia:</td>
  50. <td><input type="text" id="provincia" name="provincia" size="30" maxlength="70" value="<?php if (isset($_POST['provincia'])) { echo $_POST['provincia']; } ?>" tabindex="11"></td>
  51. </tr>
  52. <tr>
  53. <td>País:</td>
  54. <td><select name="id_pais" class="select" tabindex="12">
  55. <option value=""><--- Elige una opción ---></option>
  56. <?
  57. for ( $i = 0; $i < count($paises); $i++ ) {
  58. ?>
  59. <option value="<? echo $paises[$i]['id_pais']; ?>"<?php if ( (isset($_POST['pais'])) && ($_POST['pais'] == $paises[$i]['id_pais']) ) { ?> selected<?php } elseif ( (!isset($_POST['pais'])) ) { $_POST['pais'] = 62; ?> selected<?php } ?>><? echo str_replace( '&', '&amp;', $paises[$i]['nombre_pais'] ); ?>
  60. </option>
  61. <?
  62. }
  63. ?>
  64.  
  65. </select>
  66. </td>
  67. </tr>
  68. <tr>
  69. <td>Fecha de nacimiento:</td>
  70. <td><select name="dia" class="select" tabindex="13">
  71. <option value="">--</option>
  72. <?php
  73. $d = date('d');
  74. for ($i=1; $i<=31; $i++) {
  75. if ($i<10) $i = "0".$i;
  76. ?>
  77. <option value="<?php echo $i ?>"<?php if ( (isset($_POST['dia'])) && ($_POST['dia'] == $i) ) { ?> selected<?php } ?>><?php echo $i ?></option>
  78. <?php
  79. }
  80. ?>
  81. </select>&nbsp;
  82. <select name="mes" tabindex="14" class="select">
  83. <option value="">--</option>
  84. <?php
  85. $m = date('m');
  86. for ($i=1; $i<=12; $i++) {
  87. if ($i<10) $i = "0".$i;
  88. ?>
  89. <option value="<?php echo $i ?>"<?php if ( (isset($_POST['mes'])) && ($_POST['mes'] == $i) ) { ?> selected<?php } ?>><?php echo $i ?></option>
  90. <?php
  91. }
  92. ?>
  93. </select>&nbsp;
  94. <select name="anio" tabindex="15" class="select">
  95. <option value="">----</option>
  96. <?php
  97. $a = date('Y');
  98. $b = $a-65;
  99. $c = date('Y')-16;
  100. for ($i=$c; $i>=$b; $i--) {
  101. ?>
  102. <option value="<?php echo $i ?>"<?php if ( (isset($_POST['anio'])) && ($_POST['anio'] == $i) ) { ?> selected<?php } ?>><?php echo $i ?></option>
  103. <?php
  104. }
  105. ?>
  106. </select>
  107. </td>
  108. </tr>
  109. <tr>
  110. <td>Usuario:</td>
  111. <td><input type="text" id="usuario" name="usuario" size="10" maxlength="20" value="<?php if (isset($_POST['usuario'])) { echo $_POST['usuario']; } ?>" tabindex="16"></td>
  112. </tr>
  113. <tr>
  114. <td>Clave:</td>
  115. <td><input type="password" id="clave" name="clave" size="10" maxlength="20" value="<?php if (isset($_POST['clave'])) { echo $_POST['clave']; } ?>" tabindex="17"></td>
  116. </tr>
  117. <tr>
  118. <td>Escribe las palabras de la imagen:</td>
  119. <td>
  120. <?php
  121. //escribimos en la página lo que nos devuelve recaptcha_get_html()
  122. echo recaptcha_get_html($captcha_publickey);
  123. ?>
  124. </td>
  125. </tr>
  126. <tr>
  127. <td align="center" colspan="2"><input type="submit" name="grabar" value="Inscribir" tabindex="19"></td>
  128. </form>
  129. </tr>
  130. </table>
  131. </div>

Sigo en otro post porque no me cabe todo en uno...