mejor les pongo todo el pedazo asi me entienden un poco mejor
Código HTML:
<html>
<head>
<title>Array en Forma :: PHP</title>
</head>
<body>
<br />
<b>Selecciona tus postres favoritos:</b><br /><br />
<?php
$preg="unic";
$i=1;
?>
<form method="post" action="pagina2.php">
<input name="<?$preg.$i[]?>" type="checkbox" value="Helado de Vainilla">Helado de vanilla<br />
<input name="<?$preg.$i[]?>" type="checkbox" value="Pastel de Chocolate">Pastel de Chocolate<br />
<input name="<?$preg.$i[]?>" type="checkbox" value="Pay de elote">Pay de elote<br />
<input name="<?$preg.$i[]?>" type="checkbox" value="Bubulubu">Bubulubu<br />
<input name="<?$preg.$i[]?>" type="checkbox" value="Duraznos en almibar">Duraznos en almibar<br />
<input name="<?$preg.$i[]?>" type="checkbox" value="Fresas con crema">Fresas con crema<br />
<input name="send" type="submit" id="send" value="Enviar!">
</form>
</body>
</html>
y el post es
Código PHP:
<?php
if (isset($_POST['unic1']))
{
$postre = $_POST['unic1'];
$n = count($postre);
$i = 0;
echo "Tus postres favoritos son: rn" .
"<ol>";
while ($i < $n)
{
echo "<li>{$postre[$i]}</li> rn";
$i++;
}
echo "</ol>";
}
?>
ojala con eso me puedan ayudar. al parecer no recivo ningun dato osea el $_post esta mal pero no se en que esta mal a mi parecer esta bien bueno grax de nuevo :)