Código HTML:
Ver original<?php require_once('../Connections/Prueba.php'); ?>
<title>BIBLIOTECA LABORATORIO DE HIDRAULICA
</title> <script type="text/JavaScript"> <!--
function menu(){
var menu_1=ac
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"1");
if (restore) selObj.selectedIndex=0;
}
//-->
<table width="80%" border="0" align="center" cellpadding="0" bgcolor=""> <td colspan="3" rowspan="2" nowrap><img src="dh3.jpg" width="230" height="104" > <td height="60" nowrap colspan="3" id="logo" valign="bottom"><h2>BIBLIOTECA DEL LABORATORIO DE HIDRAULICA
</h2> <td height="50" colspan="3" valign="TOP" nowrap bgcolor="" id="tagline"><hr><H3>UMSNH
</H3></td> <td colspan="8" align="center"><H3>INVENTARIO GENERAL
</H3></td> <td width="196" valign="top" height="370"> <table border="0" cellspacing="0" cellpadding="0" width="155" id="navigation"> <td width="155" height="40" align="center"><a href="javascript:;">DEPARTAMENTO
</a></td> <td width="155" height="40" align="center"><a href="javascript:;" >LABORATORIO
</a></td> <td width="155" height="40" align="center"><a href="javascript:;">INGRESAR AL SISTEMA
</a></td>
<td width="3" bgcolor=""><img src="mm_spacer.gif" alt="" width="1" height="1" border="0"></td> <td colspan="2" valign="top"><img src="mm_spacer.gif" alt="" width="304" height="1" border="0"><br> <table border="0" cellspacing="0" cellpadding="0" width="675">
<form name="form1" method="post" action=""> VER
<select name="menu1" onChange="javascript:menu()"> <input name="textarea" type="text" value=""> <input type="submit" name="Submit" value="ACTUALIZAR LISTA" onClick=scr""> <table width="100%" border="0">
<?php
$db_host = 'localhost';
$db_user = 'root';
$database = 'hidrobib';
$table = 'memorias';
if (!mysql_connect($db_host, $db_user))
die("Can't connect to database");
if (!mysql_select_db($database))
die("Can't select database");
// sending query
$result = mysql_query("SELECT * FROM $table ORDER BY $table.Numero");
if (!$result) {
die("Query to show fields from table failed");
}
$fields_num = mysql_num_fields($result);
echo "<table border='3' width=100%><tr>";
// printing table headers
for($i=0; $i<$fields_num; $i++)
{
if ($i==0){
$field = mysql_fetch_field($result);
echo "<td width=10%>{$field->name}
</td>";
}
else{
$field = mysql_fetch_field($result);
echo "
<td>{$field->name}
</td>";
}
}
// printing table rows
while($row = mysql_fetch_row($result))
{
// $row is array... foreach( .. ) puts every element
// of $row to $cell variable
foreach($row as $cell)
}
mysql_free_result($result);
?>