Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problems with Polish letters
doodlebug
post
Post #1





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 16.09.2010

Ostrzeżenie: (0%)
-----


Hello All!
Apologies for my lack of Polish and apologies if this has gone in the wrong forum.
I'm creating a website where you enter your details in text boxes on an .html page, which you then review on a .php page.
Everything has been changed to utf-8.

The problem is when you enter Polish characters in the text box, on the next page when you review the information and say whether it's good or not, the Polish characters show up as "Auml�Auml�Auml�Aring�"

Any idea what the problem could be?

Many thanks in advance
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
doodlebug
post
Post #2





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 16.09.2010

Ostrzeżenie: (0%)
-----


The problem happens before the Polish letters get to the DB. The process is like this:

index.html -> where you enter Polish characters in text fields
review.php -> you check to see if your info is correct **This is where I have the problems with the letters**
submit.php -> info is sent to DB

The code on review.php is
  1. $string1 = isset($_POST['firstname']) ? htmlentities($_POST['firstname']) : false;
  2.  
  3. if(empty($string1))
  4. {
  5.  
  6. echo("<h2>Imię:<font color=red>Prozsę wypełnić</font></h2>\n");
  7. $showbutton=1;
  8. }
  9. else
  10. {
  11. $firstname = ereg_replace("[^0-9a-zA-Z?ąćęłńóśżźĄĆĘŁŃÓŚŻŹ ]", "", $string1);
  12. echo("<h2><span class=profile>Imię:</span> <font color=#04B404>" . $firstname . "</font></h2>\n");
  13. echo("<input type=hidden name=firstname value=" . $firstname . ">");
  14. }
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 28.12.2025 - 14:19