Foros del Web » Creando para Internet » Diseño web »

Refres php o java scrpt,soy un principiante aun; me pueden ayudar a complet

Estas en el tema de Refres php o java scrpt,soy un principiante aun; me pueden ayudar a complet en el foro de Diseño web en Foros del Web. Estoy muy bajo de conocimientos en php y java script.....me pueden ayudar a actualizar esta pagina,no se si cargar variables con $_post o de que ...
  #1 (permalink)  
Antiguo 27/07/2012, 03:39
 
Fecha de Ingreso: junio-2012
Mensajes: 6
Antigüedad: 11 años, 10 meses
Puntos: 0
Refres php o java scrpt,soy un principiante aun; me pueden ayudar a complet

Estoy muy bajo de conocimientos en php y java script.....me pueden ayudar a actualizar esta pagina,no se si cargar variables con $_post o de que forma hacer que se refrsque al cambiar parametros de busqueda en los desplegables
Código HTML:
Ver original
  1. <?php
  2. $a='';
  3. ?>
  4. <title>BIBLIOTECA </title>
  5. </head>
  6. <body bgcolor="#00CCFF">
  7. <table width="80%" border="0"  align="center" cellpadding="0"  bgcolor="#FFFFFF">
  8.   <tr bgcolor="">
  9.     <td colspan="3" rowspan="2" nowrap><img src="dh3.jpg"  width="230" height="104"  >
  10.     </td>
  11.     <td height="60" nowrap colspan="3" id="logo" valign="bottom"><h2>BIBLIOTECA </h2>
  12.     </td>
  13.     <td width="0"></td>
  14.   </tr>
  15.   <tr bgcolor="">
  16. <td height="50" colspan="3" valign="TOP"  nowrap bgcolor="" id="tagline"><hr><H3>nj</H3></td>
  17.   </tr>
  18.    <tr>
  19.     <td colspan="8" align="center"><H3>INVENTARIO GENERAL </H3></td>
  20.   </tr>
  21.   <tr>
  22.     <td width="196" valign="top" height="370">
  23.     <table border="0" cellspacing="0" cellpadding="0" width="155" id="navigation">
  24.         <tr>
  25.         </tr>
  26.         <tr>
  27.           <td width="155" height="40" align="center"><a href="javascript:;">DEPARTAMENTO</a></td>
  28.         </tr>
  29.         <tr>
  30.            <td width="155" height="40" align="center"><a href="javascript:;" >LABORATORIO</a></td>
  31.         </tr>
  32.         <tr>
  33.            <td width="155" height="40" align="center"><a href="javascript:;">INGRESAR AL SISTEMA</a></td>
  34.         </tr>
  35.         <tr>
  36.      
  37.         </tr>
  38.     </table></td>
  39.     <td width="3" bgcolor=""><img src="mm_spacer.gif" alt="" width="1" height="1" border="0"></td>
  40.     <td width="30"></td>
  41.     <td colspan="2" valign="top"><img src="mm_spacer.gif" alt="" width="304" height="1" border="0"><br>
  42.     <table border="0" cellspacing="0" cellpadding="0" width="675" >
  43.        
  44.         <tr>
  45.         </tr>
  46.           <td align="center">
  47.           <form name="form1" method="post" action="">
  48.               VER
  49.                 <select name="menu1" href"http://localhost/Biblioteca/invent_user.php">
  50.                   <option value="1">TESIS</option>
  51.                   <option value="2">MEMORIAS</option>
  52.                   <option value="3">LIBROS</option>
  53.                   <option value="4">SERIES</option>
  54.             </select>
  55.              <label>BUSCAR
  56.                  <input name="textarea" type="text" value="">
  57.               </label>
  58.              
  59.             <label>
  60.             <input type="submit" name="Submit" value="ACTUALIZAR LISTA" onClick=scr"">
  61.             </label>
  62.              <select name="menu2"  >
  63.                <option value="1">TITULO</option>
  64.                <option value="2">AUTOR</option>
  65.                <option value="3">NUMERO</option>
  66.               </select>
  67.           </form>   </td>
  68.           <tr>
  69.  
  70.           <?php
  71. $db_host = 'localhost';
  72. $db_user = 'root';
  73. $database = 'hidrobib';
  74. $table = $_POST;
  75. if (!mysql_connect($db_host, $db_user))
  76.    die("Can't connect to database");
  77.  
  78. if (!mysql_select_db($database))
  79.    die("Can't select database");
  80. if ($a=="")
  81. $a=0;
  82. $b=$a + 30;
  83. // sending query
  84. $result = mysql_query("SELECT * FROM $table ORDER BY $table.Numero LIMIT $a,$b ");
  85. if (!$result) {
  86.    die("Query to show fields from table failed");
  87. }
  88.  
  89. $fields_num = mysql_num_fields($result);
  90. echo "<table border='3' width=100% ><tr>";
  91. // printing table headers
  92. for($i=0; $i<$fields_num; $i++)
  93. {
  94.         if ($i==0){
  95.         $field = mysql_fetch_field($result);
  96.            echo "<td width=10%>{$field->name}</td>";
  97.            }
  98.     else{
  99.     $field = mysql_fetch_field($result);
  100.     echo "<td>{$field->name}</td>";
  101.     }
  102. }
  103. echo "</tr>\n";
  104. // printing table rows
  105. while($row = mysql_fetch_row($result))
  106. {
  107.     echo "<tr>";
  108.  
  109.     // $row is array... foreach( .. ) puts every element
  110.     // of $row to $cell variable
  111.     foreach($row as $cell)
  112.         echo "<td>$cell</td>";
  113.  
  114.     echo "</tr>\n";
  115. }
  116. mysql_free_result($result);
  117. ?>
  118.           </tr>
  119.       </table><input name="Prev" type="button" value="Previo" ><input name="Next"type="button" value="Siguiente" >
  120.     </Td></tr>
  121. </table>    </td>
  122. </table>      
  123.   <tr>
  124.   </tr>
  125. </body>
  126. </html>

Etiquetas: html, java, php, principiante, refres
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 02:32.