Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
galera como no post anterior estou com um problema vou postar os codigos pra ver se vcs podem me ajudar a entender pq não esta funcionado..
este é o exibe,so uma parte
$sql = mysql_query("SELECT * FROM mural");while($line = mysql_fetch_array($limite)){$id = $line ["id"];$nome = $line ["nome"];$msn = $line ["msn"];$email = $line ["email"];$site = $line ["site"];$data = $line ["data"];$color = ($i % 2 == 0) ? '#F5F5F5' : '#D7D7D7';echo"</td></tr><tr><td height=25 align=center bgcolor=#666666>";echo"<tr bgcolor='$color'>";echo"<td align=center><br>";echo"<font face=Tahoma size=1><b>Adicionado por:</b> $nome</font><br>";echo"<font face=Tahoma size=1><b>Comentário:</b></font><br>";$comentario = $line["comentario"];$comentario = str_replace("<", "[",$comentario);$comentario = str_replace(">", "]",$comentario);$comentario = str_replace(":anj:", "<IMG src=smilies/001.gif >",$comentario);$comentario = str_replace(":ner:", "<IMG src=smilies/002.gif >",$comentario);$comentario = str_replace(":olh:", "<IMG src=smilies/003.gif >",$comentario);$comentario = str_replace(":lov:", "<IMG src=smilies/004.gif >",$comentario);$comentario = str_replace(":bol:", "<IMG src=smilies/005.gif >",$comentario);$comentario = str_replace(":enj:", "<IMG src=smilies/006.gif >",$comentario);$comentario = str_replace(":cho:", "<IMG src=smilies/007.gif >",$comentario);$comentario = str_replace(":tim:", "<IMG src=smilies/008.gif >",$comentario);$comentario = str_replace(":cor:", "<IMG src=smilies/009.gif >",$comentario);$comentario = str_replace(":bej:", "<IMG src=smilies/010.gif >",$comentario);$comentario = str_replace(":lua:", "<IMG src=smilies/011.gif >",$comentario);$comentario = str_replace(":msn:", "<IMG src=smilies/012.gif >",$comentario);$comentario = str_replace(":mid:", "<IMG src=smilies/013.gif >",$comentario);$comentario= str_replace(":esp:", "<IMG src=smilies/014.gif >" ,$comentario);$comentario= str_replace(":tel:", "<IMG src=smilies/015.gif >" ,$comentario);$comentario = str_replace(":pre:", "<IMG src=smilies/016.gif >",$comentario);$comentario= str_replace(":ale:", "<IMG src=smilies/017.gif >" ,$comentario);$comentario = str_replace(":flo:", "<IMG src=smilies/018.gif >",$comentario);$comentario= str_replace(":tri:", "<IMG src=smilies/019.gif >" ,$comentario);$comentario = str_replace(":ocu:", "<IMG src=smilies/020.gif >",$comentario);$comentario = str_replace(":est:", "<IMG src=smilies/021.gif >",$comentario);$comentario = str_replace(":sor:", "<IMG src=smilies/022.gif >",$comentario);$comentario= str_replace(":lin:", "<IMG src=smilies/023.gif >", $comentario);$comentario = str_replace("[br /]", "<br>",$comentario);echo('<pre><font face=Tahoma size=1> '.$comentario.' </font></pre>');echo"<font face=Tahoma size=1><b>E-mail:</b> $email</font><br><br>";echo "<font face = Tahoma size = 1><b>Seu Msn:</b> $msn</font><br>";echo"<font face = Tahoma size = 1><b>Flog/blog</b><a href = 'http://$site' target='_blank'><font face = Tahoma size = 1> $site</a><b></b><br><br>";echo"<font face =Tahoma size=1><b>Data:</b> $data</font><br><br>";$entrar = $_COOKIE["login_adm"];if ($entrar == "$login_adm") {echo "<form method=post action=apagar.php?id=$id> <input type=hidden name=apagar value=$id><input type=\"submit\" value=\"Apagar Comentário\" style=\"font-family: verdana; font-size: 8 pt; border-style: solid; border-width: 1; background-color: #E2E2E2\"></form><form method=post action=atualiza.php?id=$id> <input type=hidden name=alterar value=$id><br><br><input type=\"submit\" value=\"Editar\" style=\"font-family: verdana; font-size: 8 pt; border-style: solid; border-width: 1; background-color: #E2E2E2\"></form>";}
este é o edita
<?include "coneccao.php";$id = $_REQUEST["id"];$nome = strip_tags($_POST["nome"]);$msn = strip_tags($_POST ["msn"]);$email = strip_tags( $_POST["email"]);$site = strip_tags($_POST["site"]);$comentario = wordwrap(strip_tags($_POST["comentario"]));$nova_data = date ("d/m/Y à\s H:i:s");$troca = mysql_query("UPDATE mural SET nome ='$nome', msn ='$msn', email ='$email', site ='$site', comentario ='$comentario', data = '$nova_data' WHERE id = $id");if($troca){echo "Editado com sucesso!!";echo "<meta HTTP-EQUIV='refresh' CONTENT='2;URL=exibe_mural.php'>";}else{echo "erro ao editar";}?>
este é o atualiza
<?include "coneccao.php";$sql = "SELECT * FROM mural WHERE id = $id";$result = mysql_query($sql) or die ("erro ao consultar");while ($line = mysql_fetch_array($result)){$id = $line ["id"];$nome = $line ["nome"];$msn = $line ["msn"];$email = $line ["email"];$site = $line ["site"];$comentario = $line ["comentario"];$data = $line ["data"];echo $line["comentario"];echo"<title>.::Livro de Visitas::.</title><style type=text/css><!--.style4 { color: #666666; font-weight: bold;}.style5 { color: #FF0000; font-weight: bold;}body,td,th { color: #d7d7d7;}.style6 { color: #666666; font-size: 11px;}--></style><meta http-equiv=Content-Type content=text/html; charset=iso-8859-1></head><body><script src=smilies/mural.js></script><table width=387 height=558 border=0 align=center cellspacing=0 bordercolor=#666666> <tr> <td bgcolor=#d7d7d7><div align=center class=style4>.::Livro de Visitas::.</div></td> </tr> <tr> <td width=479 valign=bottom bgcolor=#FFFFFF><form action=editar.php?id=".$line['id']." method=post name=mural> <h5><strong>Seu Nome* <input name=nome type=text id=nome size=40 value = ".$line['nome']."> </strong></h5> <p><strong>Seu email* <input name=email type=text id=email size=40 maxlength=50 value = ".$line['email']."></strong></p> <p><strong>Seu Msn * <input name=msn type=text id=msn size=40 value = ".$line['msn']."> </strong></p> <p><strong>Flog/Blog * <input name=site type=text id=site size=40 value = ".$line['site']."> </strong></p> <p align=center><strong>Escolha seu emotions</strong></p> <div align=center> <table width=204 border=0 cellspacing=0 bgcolor=#FFFFFF> <tr> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':anj:')><img src=smilies/001.gif alt=Anjo width=19 height=19 border=0></a></div></td> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':ner:')><img src=smilies/002.gif alt=Nervoso width=19 height=19 border=0></a></div></td> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':olh:')><img src=smilies/003.gif alt=Piscando width=19 height=19 border=0></a></div></td> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':lov:')><img src=smilies/004.gif alt=Coração Partido width=19 height=19 border=0></a></div></td> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':bol:')><img src=smilies/005.gif alt=Bolo width=19 height=19 border=0></a></div></td> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':enj:')><img src=smilies/006.gif alt=Enjoado width=19 height=19 border=0></a></div></td> </tr> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':cho:')><img src=smilies/007.gif alt=Chorando width=19 height=19 border=0></a></div></td> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':tim:')><img src=smilies/008.gif alt=Tímido width=19 height=19 border=0></a></div></td> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':cor:')><img src=smilies/009.gif alt=Coração width=19 height=19 border=0></a></div></td> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':bej:')><img src=smilies/010.gif alt=Beijo width=19 height=19 border=0></a></div></td> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':lua:')><img src=smilies/011.gif alt=Lua width=19 height=19 border=0></a></div></td> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':msn:')><img src=smilies/012.gif alt=Msn width=16 height=16 border=0></a></div></td> </tr> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':mid:')><img src=smilies/013.gif alt=Música width=19 height=19 border=0></a></div></td> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':esp:')><img src=smilies/014.gif alt=Espantado width=19 height=19 border=0></a></div></td> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':tel:')><img src=smilies/015.gif alt=Telefone width=19 height=19 border=0></a></div></td> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':pre:')><img src=smilies/016.gif alt=Presente width=19 height=19 border=0></a></div></td> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':ale:')><img src=smilies/017.gif alt=Feliz width=19 height=19 border=0></a></div></td> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':flo:')><img src=smilies/018.gif alt=Flor width=19 height=19 border=0></a></div></td> </tr> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':tri:')><img src=smilies/019.gif alt=Triste width=19 height=19 border=0></a></div></td> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':ocu:')><img src=smilies/020.gif alt=Playboy width=19 height=19 border=0></a></div></td> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':est:')><img src=smilies/021.gif alt=Estrela width=19 height=19 border=0></a></div></td> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':sor:')><img src=smilies/022.gif alt=Sorriso width=19 height=19 border=0></a></div></td> <td onMouseOver=over(this,'#E8E8E8'); onMouseOut=out(this,'#FFFFFF');><div align=center><a href=java script:emoticon(':lin:')><img src=smilies/023.gif alt=Língua width=19 height=19 border=0></a></div></td> </tr> </table> </div> <p><strong>Comentários*</strong></p> <p align=center><strong> <textarea name=comentario cols=40 rows=5 id=comentario value = ".$line['comentario']."></textarea> </strong></p> <p align=center><strong> <input name=enviar type=submit id=enviar value=Editar> <input name=apagar type=reset id=apagar value=Apagar></strong></p> <p align=center> </p> </form> <p align=center class=style5>*Todos os campos devem ser preenchidos </p> <table width=385 height=34 border=0 cellspacing=0 bordercolor=#D7D7D7> <tr> <td height=23 valign=top bgcolor=#D7D7D7><ul> <li> <h5 align=center class=style6>Criado e Desenvolvido por: Thiago Meinel ® Todos o direito Reservados. </h5> </li> </ul></td> </tr> </table></td> </tr></table><div align=center></div><h2 class=style3> </h2>";}?>
bom oq esta acontecendo é que as variaveis nome msn email site esta chegando certinho mais a variavel comentario não chega
mais e eu dou um echo nela ela motra oq esta no bd...não entendo sera q alguen pode me ajudar..
abraço gente obrigado!!!
Carregando comentários...