Código PHP:
  
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>
 
<body>
<form action="" method="post">
<br><br>
<input type="checkbox" name="check1"> Aparece
<input type="checkbox" name="check2">Desaparece
<br><br>
<input type="submit" value="Enviar =)">
</form>
 
<?php
include("conex.phtml"); 
$link=Conectarse(); 
$tabla="prueba";   //NOMBRE DE LA TABLA A MOSTRAR
 if (isset($_REQUEST['check1'])){
$result = mysql_query("select * from prueba ORDER BY nombre"); 
 
echo "<table bgcolor=\"#DDDDDD\" align=center style=\"border:2px outset black\">";
for ($i = 0; $i < mysql_num_fields($result); $i++)
    { 
    print "<th>".mysql_field_name($result, $i)."</th>\n"; 
    } 
while ($registro = mysql_fetch_row($result))
    {
    echo "<tr>";
    foreach($registro  as $clave)
        {
        echo "<td bgcolor=\"#BBBBBB\"style=\"border:1px groove red\" align=\"center\">",$clave,"</td>";
        }
    }
echo "</tr></table>";
 
}
mysql_close($link);
?>
</body>
</html>   Código PHP:
  
<select name="comboseleccion">
  <?php 
   include("conex.phtml"); 
   $link=Conectarse(); 
   $result=mysql_query("select * from prueba",$link); 
$query="SELECT * FROM PRUEBA ORDER BY nombre";
 
$resultado = mysql_query($query);
if ($resultado)
while($renglon = mysql_fetch_array($resultado))
{
$valor=$renglon['Nombre'];
echo "<option value=".$valor.">".$valor."</option>\n";
}
 
mysql_close($link);
?>
</select>   por separado ambos codigos funcionan perfecto pero cuando los quiero unir me arroja el siguiente error: Fatal error: Cannot redeclare conectarse() (previously declared in C:\AppServ\www\conex.phtml:13) in C:\AppServ\www\conex.phtml on line 24 ese error me lo da cuando pongo el segundo codigo luego de la etiqueta </form> probé colocando el codigo es muchas partes pero siempre me daba ese error.
De antemo gracias por la ayuda
 
 

 Union de codigo
 Union de codigo 



