Ver Mensaje Individual
  #1 (permalink)  
Antiguo 20/02/2008, 08:21
Avatar de T4ke0veR
T4ke0veR
 
Fecha de Ingreso: agosto-2007
Ubicación: Quito - Ecuador
Mensajes: 1.720
Antigüedad: 16 años, 8 meses
Puntos: 28
Vinculo no toma ID

Saludos,
hice un menu donde tomo los items insertados y el mismo deberia darme un id para redireccionar a una ficha donde me listen X cosas...
pero cuando doy el vinculo no me agarra el id.. me toma los valores vacios...

me toma prueba.php?Id=
en vez de hacer prueba.php?Id=1

aqui les dejo el codigo
Código PHP:
<?php require_once('Connections/connect.php'); 
$n_filas=3;
?>
<?php
if (!function_exists("GetSQLValueString")) {
function 
GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
{
  
$theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  
$theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  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;
}
}

$maxRows_Recordset1 10;
$pageNum_Recordset1 0;
if (isset(
$_GET['pageNum_Recordset1'])) {
  
$pageNum_Recordset1 $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 $pageNum_Recordset1 $maxRows_Recordset1;

mysql_select_db($database_connect$connect);
$query_Recordset1 "SELECT nombre FROM categoria ORDER BY Id ASC";
$query_limit_Recordset1 sprintf("%s LIMIT %d, %d"$query_Recordset1$startRow_Recordset1$maxRows_Recordset1);
$Recordset1 mysql_query($query_limit_Recordset1$connect) or die(mysql_error());
$row_Recordset1 mysql_fetch_assoc($Recordset1);

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;
?>
y aqui les dejo los vinculos...

Código PHP:
<?php do { ?>
              <table width="100%" border="0" cellspacing="2" cellpadding="0">
                <tr>
                  <td class="itemTEXTO"><a href="ficha_cat.php?Id=<?php echo $row_Recorset1['Id']; ?>"><?php echo $row_Recordset1['nombre']; ?></a></td>
                </tr>
              </table>
              <?php } while ($row_Recordset1 mysql_fetch_assoc($Recordset1)); ?>
y obvio cierro el recordset abajo
<?php
mysql_free_result($Recordset1);
?>
para liberar!!!! saludos y gracias de antemano!!!
__________________
Diseño gráfico, Web, imagen corporativa, publicidad ...