Ver Mensaje Individual
  #2 (permalink)  
Antiguo 31/05/2004, 13:28
Avatar de Bizo21
Bizo21
 
Fecha de Ingreso: abril-2004
Ubicación: Valdivia
Mensajes: 93
Antigüedad: 20 años
Puntos: 1
hola haber si te entendi tu lo que quieres es usar php y html junto es decir
que tu quieres colocar dentro de una consulta php el codigo html si es eso tendrias que hacer algo haci:
/*
<!--DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html-->
*/
<head>
<title>Consulta a la DB</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<body>
</head>
<?php
include("conex.php");
$link=Conectarse();

$result = mysql_query("select * from cd_releases",$link);
if (!$result)
{
echo("<p>Error haciendo la consulta en: " . mysql_error() . "</p>");
exit();
}
echo"<table width=\"760\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<!--DWLayoutTable-->
<tr>
<td width=\"760\" height=\"44\" valign=\"top\">Estos son los datos insertados en
la DB de MY SQL con php, si quieres insertar m&agrave;s datos presiona <a href=\"alta.htm\">aqui</a></td>
</tr>
<tr>
<td height=\"299\" valign=\"top\">";
while ($row = mysql_fetch_array($result))
{
//variables de ejemplo
printf ($row["Artist"]);
printf ($row["Title"] );
}
mysql_free_result($result);
mysql_close($link);

echo"<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<!--DWLayoutTable-->
<tr>
<td width="192" height="25" valign="top">Artista</td>
<td width="232" valign="top">Titulo</td>
<td width="71" valign="top">A&ntilde;o</td>
<td width="102" valign="top">LABEL</td>
<td width="163" valign="top">N&ugrave;m pistas</td>
</tr>
<tr>
<td height="29" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
</tr>
</table>

</td>
</tr>
<tr>
<td height="77">&nbsp;</td>
</tr>
</table>";
?>
</body>
</html>


es asi y cuando en codigo php hay " " o ' ' tiene que ir un \ es decir uno adelante de la comilla y otro al medio de la comilla algo asi echo" <align=\" \ " >"; os ino muestra error

prueba eso y respondes si te sirvio o no si te tiras algun erro envia el error y la funcion.