Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/07/2012, 10:29
Avatar de jusvan
jusvan
 
Fecha de Ingreso: julio-2012
Mensajes: 3
Antigüedad: 11 años, 9 meses
Puntos: 0
Respuesta: Problema con consulta

Hola que pena el problema que tengo es que cuando le oprimo el boton buscar no hace nada ni tira error ni nada.

precisamente lo que se requiere es que seleccionando de los combobox la materia y el grado y dandole a buscar aparesca te pego todo el codigo mira :


Código PHP:
<?
session_start
(); 
include(
"conectar.php");
?>
<!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=utf-8" />
<title>I.E.G.M.-Inicio</title>
<meta name="keywords" content="Holiday, free CSS template, clean, neat, aqua, white" />
<meta name="description" content="Holiday is a clean and neat free CSS template using aqua and white colors." />
<link href="templatemo_style.css" rel="stylesheet" type="text/css" />
<?php include("lib/libpagina.php"?>

<script language="javascript" type="text/javascript">
function clearText(field)
{
    if (field.defaultValue == field.value) field.value = '';
    else if (field.value == '') field.value = field.defaultValue;
}
</script>
</head>
<body>
<table width="128" align="right">
  <tr>
    <td><embed src="http://www.clocklink.com/clocks/5005-blue.swf?TimeZone=Colombia_Bogota&"  width="120" height="40" wmode="transparent" type="application/x-shockwave-flash"> </embed></td>
  </tr>
</table>
<div id="templatemo_top_wrapper">
    <div id="templatemo_top">
        <div id="templatemo_header">
            
            <div id="site_title"><h1><a href="#" target="_parent">Free CSS Templates</a></h1></div>
            
        </div> <!-- end of header -->
        <div id="templatemo_middle">
            <div id="templatemo_menu">
                <ul>
                    <li><a href="index.php" target="_parent" >Inicio</a></li>
                    <li><a href="institucionales.php" target="_parent">Institucionales</a></li>
                    <li><a href="#" class="current" >Educadores</a></li>
                    <li><a href="egresados.php" target="_parent">Egresados</a></li>
                    <li><a href="contactenos.php" target="_parent">contactenos</a></li>
                     </ul>
                
                <div id="usuario" align="right">
                   <? if ($_SESSION["autentificado"] == "SI"){ User(); }
                   else {
?>
                   <a href="login.php"><input type="submit" value="Iniciar Sesion" style="background-color: #00CCFF; color: #ffffff;" /></a>
                   <? ?>
                                 </div>
                <div class="cleaner"></div>
            </div> <!-- end of templatemo_menu -->
            
            <div id="mid_content">
                <h2><strong>I.E. Gonzalo Mejia</strong></h2>
                <p><strong>Enseñamos en la vida y para la vida.</strong></p>
            </div>
            
        </div> <!-- end of middle -->
    </div> <!-- end of top -->
</div> <!-- end of top wrapper -->

<div id="templatemo_main">
    
    <div class="col_w600 float_l">
        <div class="content_box">
        <form action="per_edu.php" method="post"  >
          <table width="350px" height="36" border="0" align="right">
               
          <tr>
          <td colspan="2"><select name="cmb_matact">
            <option selected="selected">Artistica</option>
            <option>C. Naturales</option>
            <option>C. Sociales</option>
            <option>Calculo</option>
            <option>Economia</option>
            <option>Edu. Fisica</option>
            <option>Emprendimiento</option>
            <option>Español</option>
            <option>Estadistica</option>
            <option>Etica y Valores</option>
            <option>Etnoeducacion</option>
            <option>Filosofia</option>
            <option>Fisica</option>
            <option>Geometria</option>
            <option>Ingles</option>
            <option>Matematicas</option>
            <option>Politica</option>
            <option>Quimica</option>
            <option>Religion</option>
            <option>Tecnologia</option>
            <option>Trigonometria</option>
          </select><select name="cmb_gradact">
            <option selected="selected">6to</option>
              <option>7mo</option>
              <option>8vo</option>
              <option>9no</option>
              <option>10mo</option>
              <option>11mo</option>
                  
          </select><input type="submit" name="btn_busact" value="Buscar" style="background-color: #00CCFF; color:#000" />
          }
          <? 
        
        
if (($_POST['btn_busact'])){
        
        
$result=mysql_query("select * from actividades where cmb_ matact='$cmb_matact' and gradact='$cmb_gra_act' ")or die( mysql_error() );  
        while (
$row=mysql_fetch_array($result)){
        echo 
'<tr>';
        echo 
'<td valign="top" width="100px">Actividad:</td>';
        echo 
'<td valign="top"><b>'.$row["nom_act"].'</b></td>';
        echo 
"</tr>";
        echo 
'<tr>';
        echo 
'<td valign="top">Materia:</td>';
        echo 
'<td valign="top">'.$row["mat_act"].'</td>';
        echo 
"</tr>";
        echo 
'<tr>';
        echo 
'<td valign="top">Grado:</td>';
        echo 
'<td valign="top">'.$row["gra_act"].'</td>';
        echo 
"</tr>";
        echo 
'<tr>';
        echo 
'<td colspan="2"><hr /></td>';
        echo 
'</tr>';
        echo 
'<tr>';
        echo 
'<td valign="top">Descripcion:</td>';
        echo 
'<td valign="top">'.$row["com_act"].'</td>';
        echo 
"</tr>";
        echo 
'<tr>';
        echo 
'<td valign="top">Link:</td>';
        echo 
'<td valign="top">'.$row["link_pagi"].'</td>';
        echo 
"</tr>";
        echo 
'<tr>';
        echo 
'<td colspan="2"><hr /></td>';
        echo 
'</tr>';
        }
        
?>
          </form>
        <?
        mysql_free_result
($result);        
        }
        if (
$id_usu == null){ ?>
        <a href="educadores.php" target="_parent">Educadores</a>
        <?
        
}
        
$result1 mysql_query("SELECT * FROM usuarios WHERE id_usu='$id_usu'");
        
$row1 mysql_fetch_array($result1)
        
?>
        <table width="220px" border="0" style="color:#ffffff;">
        <tr>
            <td align="center"><? echo '<img src="'.$row1["img_usu"].'" width="100%">'?></td>
        </tr>
        <tr bgcolor="#00a8ff">
            <td><? echo $row1["nom_usu"]; ?></td>
        </tr>
        <tr bgcolor="#00a8ff">
            <td><? echo $row1["ape_usu"]; ?></td>
        </tr>
        <tr bgcolor="#00a8ff">
            <td><? echo $row1["rol_usu"]; ?></td>
        </tr>
        </table>
        <?
        mysql_free_result
($result1);
        
?>