Hello All,
I am trying to fix PHP code developed by somebody else and my
knowledge of PHP is very limited so I'd appreciate any help.
I have a MySQL database configured to accept UTF-8 in all fields.
When I update the database with Unicode via phpMyAdmin web interface I
am able to write and save unicode values in all fields.
However when i try to update the database via web I am not
successful.
For example, if I enter "čćđšž" into the field I amupdating this will
be saved: "Äćđšž"
The code used to write into the db is as follows:
<?php
include('config.php');
include('adodb/adodb.inc.php');
if ($_REQUEST['v'] == $_REQUEST['verification']) {
$record = array(
'c_word_id' =$_REQUEST['word_id'],
'c_author_name' =$_REQUEST['name'],
'c_author_email' =$_REQUEST['email'],
'c_datetime' =strftime('%Y-%m-%d %H:%M:%S', strtotime('now')),
'c_text' =$_REQUEST['comment_text']
);
$db = NewADOConnection('mysql');
$db->Connect(DB_SERVER, DB_USER, DB_PASSWORD, DB_NAME);
$insertSQL = $db->AutoExecute('gim_comments', $record, 'INSERT');
You can see how the site behaves here: http://gimnazije.com/gimnazija_jagodina
Thanks!
Ira