Jump to content

CMS script adds  to the pages on display and in the DB


wmguk

Recommended Posts

Hey,

 

I've got a small CMS system running, and for some reason the CMS script adds  to the pages on display and in the DB but not in the preview page script....

 

its only near the £ so it says on the main php page:

 

1 Twin-bedded room (ensuite): £82 - £86

 

this should be

 

1 Twin-bedded room (ensuite): £82 - £86

 

I've added some script...

include 'admin/scripts/connection.php';
$sql="SELECT * FROM cmssystem WHERE name = 'rooms'"; 
$result=mysql_query($sql); 

while($row = mysql_fetch_array($result)) 
{ 
$text1 = $row['content'];
$content = str_replace(chr(192), " ", $text1);
echo $content;
}

 

but that doesnt remove it....

 

any ideas what it could be?

 

I thought charset, but my pages all start:

 

!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" />

hmmm, ok, so I have a page that is set as:

 

<?php header("Content-type: text/html; charset=utf-8");?>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

 

my DB is set - utf8_general_ci

 

but i get a square image instead of a £ symbol now?

 

any ideas?

 

If i view the db it shows a £ but as soon as that hits my page its a symbol!?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.