Parole Accentate sparite

ivarello

Utente Attivo
14 Dic 2012
211
1
16
Ragazzi sono passato dalla piattaforma easy php 5.3.0 a 12.1,ed ho notato che le parole accentate non si vedono nella pagina php dove tiro fuori i risultati dal database.
Nel database sono tutte presenti le parole accentate e vengono registrate perfettamente dal form, il campo è varchar 255 latin1 e la pagina che lo tira fuori è così:
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=iso-8859-1" />
<link href="css/stile.css" rel="stylesheet" type="text/css" />
<link rel="SHORTCUT ICON" href="images/favicon.ico">

<?php 

// richiamo il file di configurazione
require 'include/config.php';

// richiamo lo script responsabile della connessione a MySQL
require 'include/connect.php';

//includiamo il file della classe
require 'include/paginazione.inc.php';

//Istruzioni per la paginazione (da verificare)

$webpage = basename($_SERVER['PHP_SELF']);
$page = (!isset($_GET['page']))? 1 : $_GET['page'];
$result = mysql_query("select * FROM  utenti ORDER BY id DESC");

//numero di elementi da visualizzare per pagina.
$max_results = 10;
$total_results = mysql_num_rows($result);
$total_pages = ceil($total_results / $max_results);
$from = (($page * $max_results) - $max_results);
$result=mysql_query("select * FROM utenti ORDER BY id DESC LIMIT $from, $max_results ");

//Tabellazione


echo '
<center><table width="1440" border="0" cellpadding="5" cellspacing="10">
	<tr>
		<th bgcolor="#CEECF5">Nome</th>
		<th bgcolor="#CEECF5">Cognome</th>
		<th bgcolor="#CEECF5">Indirizzo</th>
		<th bgcolor="#CEECF5">Telefono</th>
		<th bgcolor="#CEECF5">eMail</th>
		<th bgcolor="#CEECF5" width="350">Messaggio</th>
		<th bgcolor="#CEECF5" width="100">Quando</th>
		<th bgcolor="#CEECF5" width="90">Stato</th>
		<th bgcolor="#CEECF5">Operatore</th>
		<th bgcolor="#CEECF5" width=60><center>Azione</center></th>
		<th bgcolor="#CEECF5" width=60><center>Azione</center></th>
	</tr></center>';

while ($row = mysql_fetch_assoc($result)) {
	$nome         = htmlentities($row['nome']);
	$cognome      = htmlentities($row['cognome']);
	$indirizzo    = htmlentities($row['indirizzo']);
	$telefono     = htmlentities($row['telefono']);
	$email        = htmlentities($row['email']);
	$messaggio    = htmlentities($row['messaggio']);
	$data         = htmlentities($row['data']);
	$stato        = htmlentities($row['stato']);
	$operatore    = htmlentities($row['operatore']);
	$link         = "fun_rispondi.php" . '?id=' . $row['id'];
	$link2        = "cerca_interventi.php?pagina=interventi";

	if(!$email)     $email = '&nbsp;';
	if(!$messaggio) $messaggio = '&nbsp;';

$colori = array(
		'Sistemato' => '#04B431', 
		'Da Richiamare' => '#FACC2E', 
		'In Lavorazione' => '#FACC2E',
		'Altro' => '#FACC2E',
		'Inesistente' => '#FE2E2E',
		'Da Sistemare' => '#FE2E2E');

	echo "<tr>
			<td bgcolor='#EFF5FB'><center>
			<a href='cerca.php?pagina=interventi&query=$nome'>$nome</a>
			</center>
		    </td>
			<td bgcolor='#F2FBEF'><center>
			<a href='cerca.php?pagina=interventi&query=$cognome'>$cognome</a>
			</center>
			</td>
			<td bgcolor='#EFF5FB'><center>$indirizzo</center></td>
			<td bgcolor='#F2FBEF'><center>$telefono</center></td>
			<td bgcolor='#EFF5FB'><center>$email</center></td>
			<td bgcolor='#F2FBEF'><center><font color=”#000000” size='2'>$messaggio</font></center></td>
			<td bgcolor='#EFF5FB'><font size='1'><center>$data</center></font></td>
			<td bgcolor='" . $colori[$row['stato']] . "'><center><font color=”#000000”>$stato</font></center></td>
			<td bgcolor='#EFF5FB'><center>$operatore</center></td>
			<td bgcolor='#F2FBEF'><center><a href=\"$link\"><img src=images/bottone_rispondi.png></a></center></td>
			<td bgcolor='#F2FBEF'><center>
			<form name='myform3' action='cerca_ip.php?pagina=visualizza' method='post'>
			<input type='hidden' name='query' value='$nome' />
			<input type='image' src='images/bottone_antenna.png' value='$nome' />
			</form>
			</center>
			</td>
		</tr>";
}

echo '</table>';

// libero la memoria di PHP occupata dai record estratti con la SELECT
mysql_free_result($result);


// chiudo la connessione a MySQL
//mysql_close();

//navigazione a pie di pagina

echo pagination_3($total_pages, $page, $webpage);

?>
 </p>
    </div>
	<p>&nbsp;</p>
<center> 
<?php footer(); ?>
  </center>
 
Risolto basta usare stripslashes ;) per chi si dovesse trovare nei miei stessi problemi ;)
 

Discussioni simili