Estoy trabajando sobre php y necesito realizar un formulario en html. Hasta aquí todo bien. Ahora lo que necesito es enviar a otra página el valor de una variable php y he pensado realizarlo a través del action del formulario. se que existe la posibilidad de enviar en action="archivo.php?var=valor" o algo así. Aunque también puedo hacerlo a través de un input type hidden. Os pongo el código para que veais lo que intento hacer, pues no soy capaz de que html me acepte la variable php.
<?php
$id=10;//por ejemplo
//-------------------------------------------------------------------------------------------------------------------
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Formulario get</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="get.php">
<label>
</br>
<select name="get_param">
<option>Nombre y apellidos</option>
<option>Fecha de nacimiento</option>
<option>Domicilio habitual</option>
</select>
<input type="hidden" name="id" value=$id>
<input type="submit" name="Submit" value="Consultar" />
</label>
</form>
</body>
</html>';
/// Finish the page
print_footer($course);
?>
Aquí represento el segundo caso, aunque tambien lo intente con el
<form id="form1" name="form1" method="post" action="get.php?id=$id">