Ver Mensaje Individual
  #12 (permalink)  
Antiguo 20/04/2011, 01:11
konvulsion
 
Fecha de Ingreso: abril-2011
Mensajes: 39
Antigüedad: 13 años, 9 meses
Puntos: 1
Respuesta: Id se me autoincrementa al refrescar con F5 del explorador de internet

Cita:
Iniciado por Sourcegeek Ver Mensaje
No haz implementado bien el codigo que te puse.
Vuelve a leer los comentarios que puse
Los he entendido perfectamente, pero es que mi cabeza no da para más y hace poco que he empezado con esto y hago lo que puedo. Según lo que yo entiendo, después del

Código PHP:
Ver original
  1. if (empty($_POST)) {

tendría que poner todo esto:

Código HTML:
Ver original
  1. <form id="form1" name="form1" method="post" action="" onclick="this.value=''">
  2.     <input name="categori" input type="hidden" type="text" id="categori" value="prueba" size="15">
  3.     <table cellpadding="0" cellspacing="0" width="607" height="178">
  4.     <!-- MSTableType="layout" -->
  5.     <tr>
  6.     <td valign="top" height="178" width="607">
  7.     <table width="607" border="1">
  8.     <tr>
  9.     <td width="160">Nombre</td>
  10.     <td width="431">
  11.     <input name="nombre" type="text" id="nombre" value="Tu nombre" size="20" onclick="this.value=''"/></td>
  12.     </tr>
  13.     <tr>
  14.     <td>texto</td>
  15.     <td><label>
  16.     <input name="email" type="text" id="email" size="96" />
  17.     </label></td>
  18.     </tr>
  19.     <tr>
  20.     <td width="160">Categor</td>
  21.     <td width="431">
  22.     &nbsp;</td>
  23.     </tr>
  24.     <tr>
  25.     <td height="23">&nbsp;</td>
  26.     <td height="23">
  27.     &nbsp;
  28.     <select name="prueba" onchange="javascript:document.form1.categori.value =(document.form1.prueba.value)">
  29.     <option value="Categoría">Categoría</option>
  30.     <option value='<a href="http://www.url.com/directorio/muñecas.php">muñecas</a>'>Muñecas</option>
  31.     <option value='<a href="http://www.url.com/directorio/ositos.php">ositos</a>'>Ositos</option>
  32.     <option value='<a href="http://www.url.com/directorio/juguetes.php">juguetes</a>'>Juguetes</option>
  33.      
  34.     </select>
  35.     <a href="respuestas.php?ydlv=1<?php echo $row_tabla['id_tabla'];?>"><?php echo $row_tabla['nombre_tabla']; ?></a>
  36.     <a href="respuestas.php?ydlv=1<?php echo $row_tabla['id_tabla'];?>">
  37.     <input type="text" name="id" id="id" size="20"></a></td>
  38.    
  39.     </td>
  40.     </tr>
  41.     <tr>
  42.     <td height="23">&nbsp;</td>
  43.     <td height="23">
  44.     <p align="center"><input type="submit" value="Enviar" name="Enviar"></td>
  45.     </tr>
  46.     <tr>
  47.     <td height="23">&nbsp;</td>
  48.     <td height="23">
  49.      
  50.     &nbsp;</td>
  51.     </tr>
  52.     </table>
  53.     </form>
  54.      
  55.     </tr>
  56.     </table>
  57.     <p>&nbsp;</p>
  58.      
  59.     <table border="0" cellspacing=10 cellpadding=0 style="font-size: 8pt"><tr>
  60.     <td><font face="verdana"><b>Id</b></font></td>
  61.     <td><font face="verdana"><b>Nombre</b></font></td>
  62.     <td><font face="verdana"><b>texto</b></font></td>
  63.     <td><font face="verdana"><b>categori</b></font></td>
  64.      
  65.     </tr>

y haría un

Código PHP:
Ver original
  1. }else{

del resto del código php... Porque el formulario es html y los query son php. Tengo un gran lío con esto, a ver si me podéis ayudar.