ive got an issue where i'm using the following query to retrieve info but there are spanish characters in the db
ive set the meta to charset=utf-8"
but i still get the dreaded <?> - i saw somewhere about using set names utf8 in the query when setting up the connection but i cant see where i put it into my actual setup:
this is the query file:
include 'config.php';
include 'opendb.php';
$result = mysql_query("SELECT * FROM jstuff WHERE id=" . $_GET['id'] . " ", $connection) or die("error querying database");
the config:
$dbhost = 'localhost';
$dbuser = 'user';
$dbpass = 'pw';
$dbname = 'name';
and the opendb
$connection = mysql_connect($dbhost, $dbuser, $dbpass) or die (mysql_error());
mysql_select_db($dbname);
i'm guessing that the best place to use the set names would be in the opendb.php file but ive no idea of actually how to do this ?
(i'm also assuming this will solve my <?> problem )