Polish character condundrum - sending info in text boxes
Posted: Thu Sep 16, 2010 3:01 pm
Hello All,
Apologies if this has been covered - i've looked (honest) and can't find the answer.
I've got a web page where people create adverts etc. They enter their names etc on one page (html, utf-8 encoded without bom) in a text box which then populates a .php page (utf-8 encoded). the php coding hopefully will send the letters correctly to the database which has also been set up utf-8.
The problem is when they are reviewing their information on the php page you see Auml�Auml�Auml�Aring�
The html code is:
The php code on the information review page is:
Any help on how this can be solved will be gratefully received!
Apologies if this has been covered - i've looked (honest) and can't find the answer.
I've got a web page where people create adverts etc. They enter their names etc on one page (html, utf-8 encoded without bom) in a text box which then populates a .php page (utf-8 encoded). the php coding hopefully will send the letters correctly to the database which has also been set up utf-8.
The problem is when they are reviewing their information on the php page you see Auml�Auml�Auml�Aring�
The html code is:
Code: Select all
<td>Imię:</td>
<td colspan="2"><input type="text" name="firstname" /></td>Code: Select all
$string1 = isset($_POST['firstname']) ? htmlentities($_POST['firstname']) : false;
if(empty($string1))
{
echo("<h2>Imię:<font color=red>Prozsę wypełnić</font></h2>\n");
$showbutton=1;
}
else
{
$firstname = ereg_replace("[^0-9a-zA-Z?ąćęłńóśżźĄĆĘŁŃÓŚŻŹ ]", "", $string1);
echo("<h2><span class=profile>Imię:</span> <font color=#04B404>" . $firstname . "</font></h2>\n");
echo("<input type=hidden name=firstname value=" . $firstname . ">");
}