Ver Mensaje Individual
  #3 (permalink)  
Antiguo 11/05/2015, 09:28
rudiaz
 
Fecha de Ingreso: abril-2015
Ubicación: Santiago de Chile
Mensajes: 80
Antigüedad: 9 años
Puntos: 0
Respuesta: Problemas al ingresar datos a la base de datos

Esta es la tercera parte, el archivo guardar va en otro mensaje:

Código PHP:
Ver original
  1. echo("  <td>Cargo</td>");
  2. echo("  <td><input type=text value=".chr(34).$cargo.chr(34)."  name=cargo size=30 maxlength=40 onkeypress=".chr(34)."return tabular(event,this)".chr(34)."></td>");
  3. echo("</tr>");
  4. echo("<tr>");
  5. echo("  <td>Celular</td>");
  6. echo("  <td><input type=text value=".chr(34).$celular.chr(34)."  name=celular size=12 maxlength=12 onkeypress=".chr(34)."return tabular(event,this)".chr(34)."></td>");
  7. echo("</tr>");
  8.  
  9. $busqueda = 0;
  10. $cont=1;
  11. $busqueda = mysql_query("SELECT * FROM equipos_computacionales");
  12. $Total=mysql_num_rows($busqueda);
  13. if (($busqueda)>0){
  14.     echo "ingresa aca";
  15.     $ini=($Total+1);
  16.    
  17. }
  18. if ($Total==0){
  19.    echo "No encuentra registro";
  20.    $ini=($Total+1);
  21. }
  22. ?>
  23. <form action="grabar.php"method="POST" name="form3">
  24. <?
  25. echo("<table border=1 width=100%>");
  26. echo("<br>");
  27. echo("<tr>");
  28. echo("<td colspan='2' bgcolor='#00FFFF'><span class='Estilo1 Estilo6'>Claves del Sistema</span></td>");
  29. echo("</tr>");
  30. echo("<table border=1 width=100%>");
  31. echo("<tr>");
  32. echo("</tr>");
  33. echo("  <td>e-Mail</td>");
  34. echo("  <td><input type=text name=email size=20 maxlength=20 onkeypress=".chr(34)."return tabular(event,this)".chr(34)."></td>");
  35. echo("</tr>");
  36. echo("  <td>Clave Correo</td>");
  37. echo(" <td><input type=text name=clave_correo size=30 maxlength=40 onkeypress=".chr(34)."return tabular(event,this)".chr(34)."></td>");
  38. echo("</tr>");
  39. echo("</table>");
  40.  
  41. echo("</tr>");
  42. echo("<table border=1 width=100%>");
  43. echo("<br>");
  44. echo("<tr>");
  45. echo("<td colspan='2' bgcolor='#00FFFF'><span class='Estilo1 Estilo6'>Plataforma</span></td>");
  46. echo("</tr>");
  47.  
  48. echo("<table border=1 width=100%>");
  49. echo("<tr>");
  50. echo("</tr>");
  51. echo("<tr>");
  52. echo("<td>Nombre de Usuario</td>");
  53. echo("  <td><input type=text name=nombre size=12 maxlength=12 onkeypress=".chr(34)."return tabular(event,this)".chr(34)."></td>");
  54. echo("</tr>");
  55. echo("<tr>");
  56. echo("  <td>Contraseña</td>");
  57. echo("  <td><input type=text name=contrasena size=12 maxlength=12 onkeypress=".chr(34)."return tabular(event,this)".chr(34)."></td>");
  58. echo("</tr>");
  59. echo("<tr>");
  60. echo("  <td>Numero Unico</td>");
  61. echo(" <td><input type=text name=num_unico size=30 maxlength=40 onkeypress=".chr(10)."return tabular(event,this)".chr(10)."></td>");
  62. echo("</tr>");
  63. echo("</table>");
  64.  
  65. echo("</tr>");
  66. echo("<table border=1 width=100%>");
  67. echo("<br>");
  68. echo("<tr>");
  69. echo("<td colspan='2' bgcolor='#00FFFF'><span class='Estilo1 Estilo6'>Equipos</span></td>");
  70. echo("</tr>");
  71.  
  72. echo("<table border=1 width=100%>");
  73. echo("<tr>");
  74. echo("</tr>");
  75. echo("<tr>");
  76. echo("<td>Seleccione el Tipo de Equipo</td>");
  77. echo("<td>");
  78. ?> <select name="$tipo_equipo" size="1">
  79. <option value="PC" selected>PC</option>
  80. <option value="NOTEBOOK">Notebook</option>
  81. <option value="PANTALLA">Pantalla</option>
  82. </select>
  83. <?
  84. echo("</td>");
  85. echo("<tr>");
  86. echo("<tr>");
  87. echo("  <td>IP</td>");
  88. echo(" <td><input type=text name=ip_equipo size=15 maxlength=15 onkeypress=".chr(15)."return tabular(event,this)".chr(15)."></td>");
  89. echo("</tr>");
  90. echo("<tr>");
  91. echo("<tr>");
  92. echo("  <td>Propiedad de:</td>");
  93. echo("<td>");
  94. ?> <select name="$propiedad" size="1">
  95. <option value="Curifor" selected>Curifor</option>
  96. <option value="Personal">Personal</option>
  97. </select>
  98. <?
  99. echo("</td>");
  100.  
  101. echo("<tr>");
  102. echo("  <td valign='top'>Detalles</td>");
  103. echo(" <td> "); ?>
  104. <textarea name="$detalle" rows="100" cols="100" enabled>
  105. </textarea>
  106. <? echo "</td>";
  107. echo "</tr>";
  108. echo("</table>");
  109.  
  110. echo("<tr>");
  111. echo("<br>");
  112. echo("<table border=1 width=100%>");
  113. echo("<tr>");
  114. echo("<table border=1 width=100%>");
  115. }
  116. ?>
  117. <input type="submit" value="Guardar" onclick="location.href="grabar.php""">
  118. </form>
  119.  
  120. </form>
  121. </div>
  122. </body>
  123. </html>