Cita:
Iniciado por _ssx
Si necesitas fuerza usar href pasa entonces las variables por $_ Get
Código PHP:
<a*href="mostrar.php?clave=123456&nombre=otravariable"*><?php*echo*$row_asignaturas['nombre'];*?></a>
Entonces en mostrar recibes $_GET['clave'] y $_GET['nombre']
Ok gracias mira ya maneje el GET antes para q cuando seleccionen el grupo mande las materias que corresponden al mismo, tengo esta función
Código HTML:
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$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;
}
}
$colname_asignaturas = "-1";
if (isset($_GET['idgrado'])) {
$colname_asignaturas = $_GET['idgrado'];
}
mysql_select_db($database_connection, $connection);
$query_asignaturas = sprintf("SELECT * FROM asignaturas WHERE idgrado = %s ", GetSQLValueString($colname_asignaturas, "text"));
$asignaturas = mysql_query($query_asignaturas, $connection) or die(mysql_error());
$row_asignaturas = mysql_fetch_assoc($asignaturas);
$totalRows_asignaturas = mysql_num_rows($asignaturas);
lo que no se es como aqui
Código HTML:
$colname_asignaturas = "-1";
if (isset($_GET['idgrado'])) {
$colname_asignaturas = $_GET['idgrado'];
agregar el GET para la clave de la materia