al insertar dos form en una web me dan conflitos... uno es un buscador y el otro es un listado de productos... cuando monto el de buscar, el listado deja d mostrar los productos.. no me lista nada
les dejo mi codigo
Código PHP:
<?php
// Conexión
require_once('Connections/cersol.php');
// Paso de variable de búsqueda
$buscar = $_POST['palabra'];
$currentPage = $_SERVER["PHP_SELF"];
// Parámetros de paginación
$maxRows_Recordset1 = 50;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
// Consulta SQL 1
mysql_select_db($database_cersol, $cersol);
$query_Recordset1 = "SELECT * FROM articulos WHERE nombre like '%$buscar%' OR fondos like '%$buscar%' OR aspecto like '%$buscar%' OR descripcion like '%$buscar%' OR linea like '%$buscar%' OR presentacion like '%$buscar%' OR uso like '%$buscar%' ORDER BY id_articulo DESC";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $cersol) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
// Paginación 1
if (isset($_GET['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
$queryString_Recordset1 = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_Recordset1") == false &&
stristr($param, "totalRows_Recordset1") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_Recordset1 = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1, $queryString_Recordset1);
?>
<?php require_once('conect.php');
if (isset($_POST['enviar'])) {
extract($_POST);
header("Location: ficha_prod.php?id_articulo=".$model."");
exit();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Pinturas Flamuko - Nuestra Empresa</title>
<script language="javascript" src="chainedselects.js"></script>
<script language="javascript" src="contenido.php"></script>
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<style type="text/css">
<!--
body {
background-color: #E22325;
}
-->
</style>
<script type="text/javascript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
function MM_callJS(jsStr) { //v2.0
return eval(jsStr)
}
//-->
</script>
<link href="css/estilo.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
a {
font-family: Verdana, Geneva, sans-serif;
font-size: 11px;
color: #E6E7E9;
}
a:visited {
color: #E6E7E9;
}
a:hover {
color: #666;
}
a:active {
color: #E6E7E9;
}
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body onLoad="initListGroup('vehicles', document.forms[0].maker, document.forms[0].type, document.forms[0].model);">
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td rowspan="2" valign="top"><img src="images/bg1_prod.jpg" width="24" height="500" /></td>
<td><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','1000','height','300','src','menu_int?sc=3','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','menu_int?sc=3' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="1000" height="300">
<param name="movie" value="menu_int.swf?sc=3" />
<param name="quality" value="high" />
<embed src="menu_int.swf?sc=3" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="1000" height="300"></embed>
</object></noscript></td>
<td rowspan="2" valign="top"><img src="images/bg2_prod.jpg" width="24" height="500" /></td>
</tr>
<tr>
<td height="563" valign="top" background="images/bg_productos.jpg"><table width="1000" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="61"> </td>
<td> </td>
<td> </td>
<td align="right" valign="bottom"><?php include("form.php"); ?></td>
<td> </td>
</tr>
<tr>
<td width="36"> </td>
<td width="380" valign="top"><table width="380" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/productos.jpg" width="177" height="32" /></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td class="itemTEXTO">Seleccione las especificaciones del producto que necesita.</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><form method="post">
<table width="380" height="50" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" class="azul_verd_nrm"><table width="90%" border="0" align="center" class="negra_10">
<tr>
<td><select name="maker" class="menu_pro" style="width:200px">
</select> </td>
</tr>
<tr>
<td height="15"></td>
</tr>
<tr>
<td><select name="type" class="menu_pro" style="width:200px">
</select></td>
</tr>
<tr>
<td height="15"></td>
</tr>
<tr>
<td><select name="model" class="menu_pro" style="width:200px">
</select></td>
</tr>
<tr>
<td><br /> <input name="enviar" type="submit" class="noticias_home" id="enviar" value="Buscar" /></td>
</tr>
</table></td>
</tr>
</table>
</form> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
<td> </td>
<td><img src="images/color_pick.jpg" width="538" height="447" /></td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
<td valign="top"><img src="images/foot_prod.jpg" width="1000" height="12" /></td>
<td> </td>
</tr>
</table>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
<tr>
<td align="center"><span class="textoINDEX">2009. Pinturas Flamuko, C.A. RIF: J-07541268-0 Todos los derechos reservados. website desarrollado por </span><a href="http://www.indexa.com.ve" target="_blank">indexa</a></td>
</tr>
</table>
<p> </p>
<script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
//-->
</script>
</body>
</html>
Código PHP:
<FORM ACTION="<?php $_SERVER['PHP_SELF'] ?>" METHOD="POST" class="textoLO">
<div align="right" class="textoINDEX">Buscar:
<INPUT NAME="palabra" TYPE="text" class="textoINDEX" id="palabra" value="<?php echo $_POST['palabra']; ?>" size="50">
<input name="enviar1" type="submit" class="itemTEXTO" id="enviar1" value="enviar1" />
</div>
</FORM>