I've connected my php webpage to my .mdb
database via odbc connection.
My first question is:
What should I do to avoid ????
instead of proper Persian characters, when displaying my db table rows on the page.
My sample html code:
<form action="" method="post">
<input type="text" value="my_value">
</form>
My sample PHP code:
<?php
$conn = odbc_connect('my_db','','');
if (!$conn) {
exit("Connection Failed: " . $conn);
}
$submitted_value = $_POST["my_value"];
$sql = "SELECT * FROM my_table WHERE column1 = '$submitted_value'";
$result = odbc_exec($conn,$sql);
odbc_close($conn);
?>
My charset is already set to UTF-8
in php.ini
.
And my second question is: (which I think might be because of the above problem):
When I type Persian in the html input value tag (instead of "my_value") and already have a row with exactly the same value in column 1, nothing is returned.
But When I change both value tag name and column 1 value of the table row to English. The result is returned.
Can anyone help me with this? I appreciate in advance.