aqui voy a poner el codigo php (el codigo lo genera el dreamweaver automaticamente):
Código PHP:
Ver original<?php require_once('Connections/cnx.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
}
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ?
intval($theValue) : "NULL"; break;
case "double":
$theValue = ($theValue != "") ?
doubleval($theValue) : "NULL"; break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$query_rsCategorias = "SELECT * FROM categorias";
$colname_rsLocal = "-1";
if (isset($_GET['categoria'])) { $colname_rsLocal = $_GET['categoria'];
}
$query_rsLocal = sprintf("SELECT * FROM `local` WHERE categoria = %s", GetSQLValueString
($colname_rsLocal, "text"));
$MM_paramName = "";
// *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
// create the list of parameters which should not be maintained
$MM_removeList = "&index=";
if ($MM_paramName != "") $MM_removeList .= "&".strtolower($MM_paramName)."="; $MM_keepURL="";
$MM_keepForm="";
$MM_keepBoth="";
$MM_keepNone="";
// add the URL parameters to the MM_keepURL string
while (list ($key, $val) = each ($_GET)) { if (!stristr($MM_removeList, $nextItem)) { }
}
// add the Form parameters to the MM_keepURL string
while (list ($key, $val) = each ($_POST)) { if (!stristr($MM_removeList, $nextItem)) { $MM_keepForm .= "&".$key."=".urlencode($val); }
}
}
// create the Form + URL string and remove the intial '&' from each of the strings
$MM_keepBoth = $MM_keepURL."&".$MM_keepForm;
if (strlen($MM_keepBoth) > 0) $MM_keepBoth = substr($MM_keepBoth, 1); if (strlen($MM_keepURL) > 0) $MM_keepURL = substr($MM_keepURL, 1); if (strlen($MM_keepForm) > 0) $MM_keepForm = substr($MM_keepForm, 1); ?>