lo que pregunto es Estaria mal separar el html y el php de un sistema
por ejemplo asi :
Código PHP:
<?php
// Aqui estoy realizando una consulta mysql
$sql="Select id,nombrea,apellido,sexo,cedula,nacionalidad,edad,grado,fnace,rcedula,nacionalidadr,seccion,direccion,seccion,turno FROM alumno WHERE id=".$_REQUEST['id'].";";
$result = mysql_query ($sql);
// Aqui realizo un bucle para que me llene las tabla de los datos de la consulta
while ($row = mysql_fetch_array($result)){
?> // Aqui estoy cerrando
//Aqui empiezo el html sin nada de echo o printf
<table border="0" id="tablaresultadoalum1"><td>
<table border = "1" bordercolor="#ggg568" cellpadding=0 cellspacing=0 id="tablaresultadoalum" ><tr>
<td width="53" height="23" valign="top">Foto:</td>
<TD colspan="2" valign="top"> </TD><tr><td height="23" colspan="2" width="200">Nombre y apellido :</td><td width="200"><b><?php echo $row["nombrea"]?> <b><?php echo $row["apellido"]?></td><tr>
<td height="23" colspan="2">Sexo :</td><td><b><?php echo$row["sexo"]?></td><tr>
<td height="23" colspan="2">Edad</td><td><b><?php echo $row["edad"]?></td><tr>
<td height="23" colspan="2">Cedula</td><td><b><input name="cedula" type="text" value = "<?php echo $row["cedula"]?>" > </td><tr>
<td height="23" colspan="2">Fecha de nacimiento</td><td><b><?php echo $row["fnace"]?></td><tr>
<td height="23" colspan="2">direccion</td><td><b><?php echo $row["direccion"]?></td><tr>
<td height="23" colspan="2">Grado</td><td><b><?php echo $row["grado"]?></td><tr>
<td height="23" colspan="2">Turno</td><td><b><?php echo $row["turno"]?></td><tr>
<td height="23" colspan="2">Seccion: </td><td><b><?php echo $row["seccion"]?></b></td>
<? // abro el php para cerrar el bucle del while
}//
?>
Yo la verdad no veo bien ya que no tengo que estar poniendo echo en cada html ,tambien estar pendiente de las comillas "" o por ejemplo hacer asi colspan=\"2\" para que no me salga u error y otras cosas mas..
y otra cosa como aun no e hecho el dinseño se me hace mas facil tener solo el codigo html sin solo el php como este <?php echo $row["seccion"]?>
¿Que dicen ustedes?