Comunidad de diseño web y desarrollo en internet online

problema con tildes y eñes a la hora de mostrar los datos

Citar            
MensajeEscrito el 22 Ene 2010 10:11 pm
Hola que tal :D soy nueva en el foro y estaba buscando ayuda con respecto a el típico problema con las tíldes y la eñes :( que se por lo que vi se suele tener cuando uno jala los datos que se guardan en una base de datos (estoy trabajando con PHP 5 y My SQL 6) este es el codigo:

Código :

<?php include 'seguridad.php';?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<script type="text/javascript">

function pregunta(codigo) {
if(confirm("Se dispone a borrar la fila. ¿DESEA CONTINUAR?")) {
window.location.href='eliminar.php?recordID='+codigo;    
} 
} 

</script>
</head>

<body>
<?php include 'menus.php';?>

<table width="900" height="800" border="0" cellpadding="0" cellspacing="0" >
  <tr>
    <td width="900" height="800" valign="top">
          <table width="806" height="285" border="1" cellpadding="0" cellspacing="0" >
        <tr>
          <td width="860"> <p align="center" ><em>Lista de videos registrados</em></p>
          <hr  width="90%"/>
          <p></p>
      <form id="form1" name="form1" method="post" action="subir_video.php">
        <table width="784" height="98" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="784" height="39" align="center"><table width="95%" height="39" border="1" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="8%" height="17" >Código</td>
                  <td width="15%" >Fecha de Inserción</td>
                  <td width="21%" >Título</td>
                  <td width="36%" >Descripción</td>
                  <td colspan="2" >Acción</td>
                </tr>
               
                <?php
     include("conex.php");  
   include_once "funciones/utiles.php";    
   $link=Conectarse();
    $sql="SELECT * from videos ORDER BY FECHA DESC";
   $rs = mysql_query($sql, $link);
    while($row = mysql_fetch_array($rs)) 
   {
  ?>
                <tr bordercolor="#333333">
                  <td height="20" ><?php echo $row["codigo"]; ?></td>
                  <td ><?php echo cambiaf_a_normal($row["fecha"]); ?></td>
                  <td ><?php echo $row["titulo"]; ?></td>
                  <td >
                    <?php  echo $row["descripcion"]; ?></td>
                  <td width="10%" ><a href="#"  onclick="pregunta(<?php echo $row["codigo"]; ?>)" ><img src="img/eliminar.gif" alt="Eliminar" width="16" height="16" border="0" /> Eliminar</a></p></td>
                  <td width="10%"  class="texto4"> <a href="info_video.php?recordID=<?php echo $row['codigo']; ?>" ><img src="img/examinar.gif" alt="Examinar" width="16" height="16" border="0" /> Examinar</a></td>
                </tr>
                <?php }
  mysql_close($link);
   ?>
            </table></td>
          </tr>
          <tr>
            <td height="59" ><label>
              <input type="submit" name="button" id="button" value="Agregar" />
            </label>
              <label>
              <div align="center">            </div>
              </label></td>
          </tr>
        </table>
      </form></td>
        </tr>
      </table>
 </td>
  </tr>
</table>
</body>
</html>




en este código saco los datos alamacenados en mi base de datos, pero a la hora de mostrarlos salen con caracteres raros en donde van las tildes y otros caracteres probe con utf8, Iso htmentities, pero no encuentro la solucion :cry: porfavor me pueden ayudar?? Gracias :oops:

Por kuroTenshi

0 de clabLevel



 

msie8
Citar            
MensajeEscrito el 23 Ene 2010 01:09 am
Prueba encodear los datos leídos:

Código PHP :

utf8_encode($row["descripcion"]);

Por elchininet

Claber

3921 de clabLevel

17 tutoriales

Genero:Masculino  

Front-end developer at Booking.com

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.