eudeoliveira Postado Fevereiro 25, 2008 Denunciar Share Postado Fevereiro 25, 2008 ola boa tarde gostaria de saber se alguém pode me ajudar quero fazer um sistema de mensagem ex.uma pagina que armazena informações em um banco de dados no qual depois resgato as informações porem as quebra de linha não retornam.vou postar o codigo para ficar melhor:Essa e a pagina que exibe a mensagem:<?phpinclude("conecta.php");$sql="select * from frase ";$consulta=mysql_query($sql);?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>.::Mural::.</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><script language="JavaScript" type="text/JavaScript"><!--function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();}MM_reloadPage(true);//--></script></head><body bgcolor="#000000" text="#FFFFFF" link="#FF0000"><div id="Layer1" style="position:absolute; left:170px; top:15px; width:642px; height:227px; z-index:1"><img src="fundo.gif" width="657" height="292" border="0" usemap="#Map"> <map name="Map"> <area shape="rect" coords="639,6,653,14" href="alterarfrase.php"> </map></div><div id="Layer2" style="position:absolute; left:192px; top:311px; width:659px; height:26px; z-index:2"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="103" height="24"> <param name="BASE" value="."> <param name="BGCOLOR" value="#000000"> <param name="movie" value="button1.swf"> <param name="quality" value="high"> <embed src="button1.swf" width="103" height="24" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#000000" base="." ></embed> </object> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="103" height="24"> <param name="BASE" value="."> <param name="movie" value="button2.swf"> <param name="quality" value="high"> <param name="bgcolor" value="#000000"> <embed src="button2.swf" width="103" height="24" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#000000" base="."></embed> </object> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="103" height="24"> <param name="BASE" value="."> <param name="BGCOLOR" value="#000000"> <param name="movie" value="button3.swf"> <param name="quality" value="high"> <embed src="button3.swf" width="103" height="24" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#000000" base="." ></embed> </object> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="103" height="24"> <param name="BASE" value="."> <param name="movie" value="button4.swf"> <param name="quality" value="high"> <param name="bgcolor" value="#000000"> <embed src="button4.swf" width="103" height="24" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#000000" base="."></embed> </object> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="103" height="24"> <param name="BASE" value="."> <param name="movie" value="button5.swf"> <param name="quality" value="high"> <param name="bgcolor" value="#000000"> <embed src="button5.swf" width="103" height="24" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#000000" base="."></embed> </object> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="103" height="24"> <param name="BASE" value="."> <param name="movie" value="button6.swf"> <param name="quality" value="high"> <param name="bgcolor" value="#000000"> <embed src="button6.swf" width="103" height="24" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#000000" base="."></embed> </object></div><div id="Layer3" style="position:absolute; left:233px; top:366px; width:563px; height:48px; z-index:3"> <div align="center"><font color="#FFFF00" face="Comic Sans MS"><strong><font size="+2">*Mural, se possivel atualizado diariamente*</font></strong><br> <font color="#FF0000">Aki vo posta sempre alguma frasi ... xD <br> Se possivel diariamente ... <br> Aiii em baixo tem o mural, para você sempre comenta !!! <br> Por favor se indentifique ... </font></font></div></div><div id="Layer4" style="position:absolute; left:222px; top:521px; width:604px; height:178px; z-index:4"> <center> <strong><font size="4" face="Verdana, Arial, Helvetica, sans-serif"><?php while($result=mysql_fetch_array($consulta)){?> "<?php print $result[frase]; ?>" </font></strong> </center> <div align="center"></div> <div align="center"></div> <div align="center"></div> <div align="center"></div></div><div id="Layer6" style="position:absolute; left:271px; top:710px; width:517px; height:54px; z-index:6"><font color="#FF0000" size="+1" face="Comic Sans MS"><strong>*COMENTARIOS BESTAS COMEÇAM APARECER...<br> ... QUANDO SEU SUCESSO COMEÇA A INCOMODAR*</strong></font></div><div id="Layer5" style="position:absolute; left:244px; top:802px; width:569px; height:166px; z-index:7"> <div align="center"> <p><font color="#0000FF" size="+4" face="Comic Sans MS"><strong>MURAL</strong></font></p> <p><strong><font color="#0000FF" size="+1" face="Comic Sans MS">*Comentarios bestas, serão deletados!<font size="+3">*</font></font></strong></p> <p><strong><font color="#0000FF" size="+1" face="Comic Sans MS"><font size="+3"><br> Moderador:</font> </font></strong></p> </div></div><div id="Layer7" style="position:absolute; left:617px; top:974px; width:68px; height:28px; z-index:8"><img src="<?php print $result[status]?>.gif" alt="<?php print $result[status]?>" width="70" height="62"> <? }?></div><div id="Layer8" style="position:absolute; left:261px; top:1049px; width:561px; height:271px; z-index:9"><!-- início do código para o mural CódigoFonte.net --><center><IFRAME width='230' height='300' frameborder=0 src='http://mural.codigofonte.net/exibir.php?id=98139'></IFRAME></center><!-- final do código para o mural CódigoFonte.net --></div></body></html>[/codebox]agradeço quem puder me ajudarvlw... Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 MLeandroJr! Postado Fevereiro 25, 2008 Denunciar Share Postado Fevereiro 25, 2008 Você pode utilizar o nl2br para fazer isso.( http://www.php.net/manual/pt_BR/function.nl2br.php )Tente utilizar este código:<?phpinclude("conecta.php");$sql="select * from frase ";$consulta=mysql_query($sql);?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>.::Mural::.</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><script language="JavaScript" type="text/JavaScript"><!--function MM_reloadPage(init) { //reloads the window if Nav4 resizedif (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();}MM_reloadPage(true);//--></script></head><body bgcolor="#000000" text="#FFFFFF" link="#FF0000"><div id="Layer1" style="position:absolute; left:170px; top:15px; width:642px; height:227px; z-index:1"><img src="fundo.gif" width="657" height="292" border="0" usemap="#Map"><map name="Map"><area shape="rect" coords="639,6,653,14" href="alterarfrase.php"></map></div><div id="Layer2" style="position:absolute; left:192px; top:311px; width:659px; height:26px; z-index:2"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="103" height="24"><param name="BASE" value="."><param name="BGCOLOR" value="#000000"><param name="movie" value="button1.swf"><param name="quality" value="high"><embed src="button1.swf" width="103" height="24" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#000000" base="." ></embed></object><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="103" height="24"><param name="BASE" value="."><param name="movie" value="button2.swf"><param name="quality" value="high"><param name="bgcolor" value="#000000"><embed src="button2.swf" width="103" height="24" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#000000" base="."></embed></object><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="103" height="24"><param name="BASE" value="."><param name="BGCOLOR" value="#000000"><param name="movie" value="button3.swf"><param name="quality" value="high"><embed src="button3.swf" width="103" height="24" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#000000" base="." ></embed></object><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="103" height="24"><param name="BASE" value="."><param name="movie" value="button4.swf"><param name="quality" value="high"><param name="bgcolor" value="#000000"><embed src="button4.swf" width="103" height="24" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#000000" base="."></embed></object><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="103" height="24"><param name="BASE" value="."><param name="movie" value="button5.swf"><param name="quality" value="high"><param name="bgcolor" value="#000000"><embed src="button5.swf" width="103" height="24" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#000000" base="."></embed></object><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="103" height="24"><param name="BASE" value="."><param name="movie" value="button6.swf"><param name="quality" value="high"><param name="bgcolor" value="#000000"><embed src="button6.swf" width="103" height="24" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#000000" base="."></embed></object></div><div id="Layer3" style="position:absolute; left:233px; top:366px; width:563px; height:48px; z-index:3"><div align="center"><font color="#FFFF00" face="Comic Sans MS"><strong><font size="+2">*Mural,se possivel atualizado diariamente*</font></strong><br><font color="#FF0000">Aki vo posta sempre alguma frasi ... xD <br>Se possivel diariamente ... <br>Aiii em baixo tem o mural, para você sempre comenta !!! <br>Por favor se indentifique ... </font></font></div></div><div id="Layer4" style="position:absolute; left:222px; top:521px; width:604px; height:178px; z-index:4"><center><strong><font size="4" face="Verdana, Arial, Helvetica, sans-serif"><?php while($result=mysql_fetch_array($consulta)){?>"<?php$tmpResultado = $result[frase];echo nl2br($tmpResultado); ?>"</font></strong></center><div align="center"></div><div align="center"></div><div align="center"></div><div align="center"></div></div><div id="Layer6" style="position:absolute; left:271px; top:710px; width:517px; height:54px; z-index:6"><font color="#FF0000" size="+1" face="Comic Sans MS"><strong>*COMENTARIOSBESTAS COMEÇAM APARECER...<br>... QUANDO SEU SUCESSO COMEÇA A INCOMODAR*</strong></font></div><div id="Layer5" style="position:absolute; left:244px; top:802px; width:569px; height:166px; z-index:7"><div align="center"><p><font color="#0000FF" size="+4" face="Comic Sans MS"><strong>MURAL</strong></font></p><p><strong><font color="#0000FF" size="+1" face="Comic Sans MS">*Comentariosbestas, serão deletados!<font size="+3">*</font></font></strong></p><p><strong><font color="#0000FF" size="+1" face="Comic Sans MS"><font size="+3"><br>Moderador:</font> </font></strong></p></div></div><div id="Layer7" style="position:absolute; left:617px; top:974px; width:68px; height:28px; z-index:8"><img src="<?php print $result[status]?>.gif" alt="<?php print $result[status]?>" width="70" height="62"><? }?></div><div id="Layer8" style="position:absolute; left:261px; top:1049px; width:561px; height:271px; z-index:9"><!-- início do código para o mural CódigoFonte.net --><center><IFRAME width='230' height='300' frameborder=0 src='http://mural.codigofonte.net/exibir.php?id=98139'></IFRAME></center><!-- final do código para o mural CódigoFonte.net --></div></body></html>[/codebox] Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 eudeoliveira Postado Fevereiro 25, 2008 Autor Denunciar Share Postado Fevereiro 25, 2008 vlw MLeandroJr!muito obrigado pela ajuda..esta usando errado essa função vlw mesmo... Citar Link para o comentário Compartilhar em outros sites More sharing options...
Pergunta
eudeoliveira
ola boa tarde gostaria de saber se alguém pode me ajudar quero fazer um sistema de mensagem ex.
uma pagina que armazena informações em um banco de dados no qual depois resgato as informações porem as quebra de linha não retornam.
vou postar o codigo para ficar melhor:
Essa e a pagina que exibe a mensagem:
agradeço quem puder me ajudar
vlw...
Link para o comentário
Compartilhar em outros sites
2 respostass a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.