EStoy haciendo un buscador con este codigo
Código PHP:
<HTML>
<form method="POST" action="buscador.php">
<p align="center" style="word-spacing: 0; margin-top: 0; margin-bottom: 0">Pintura <input type="checkbox" name="Tecnica" value="Pintura">
Ceramica <input type="checkbox" name="Tecnica" value="Ceramica"></p>
<p align="center" style="word-spacing: 0; margin-top: 0; margin-bottom: 0">Grabado<input type="checkbox" name="Tecnica" value="Grabado">
Escultura<input type="checkbox" name="Tecnica" value="Escultura"></p>
<p align="center" style="word-spacing: 0; margin-top: 0; margin-bottom: 0"><input type="submit" value="Buscar" name="B1"></p>
</form>
</HTML>
<?php require_once('../ul/Connections/art.php'); ?>
<?php
$Tecnica=$_POST['Tecnica'];
$maxRows_Recordset1 = 10;
$pageNum_Recordset1 = 0;
if (isset($HTTP_GET_VARS['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $HTTP_GET_VARS['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
mysql_select_db($database_art, $art);
$query_Recordset1 = "select * from artistas
where Tecnica='$Tecnica'";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $art) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
if (isset($HTTP_GET_VARS['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $HTTP_GET_VARS['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
?>
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<label></label>
<p> </p>
<table border="1" cellspacing="2">
<tr>
<td><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Cod_art</font></strong></td>
<td><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Nombre_art</font></strong></td>
<td><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Descrip</font></strong></td>
<td><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Curric</font></strong></td>
<td><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Nombre_foto</font></strong></td>
<td><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Tecnica</font></strong></td>
</tr>
<?php do { ?>
<tr>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_Recordset1['Cod_art']; ?></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_Recordset1['Nombre_art']; ?></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_Recordset1['Descrip']; ?></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_Recordset1['Curric']; ?></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_Recordset1['Nombre_foto']; ?></font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_Recordset1['Tecnica']; ?></font></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
Notice: Undefined index: Tecnica in c:\inetpub\wwwroot\arte\buscador.php on line 12