LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   php unicode global variable (https://www.linuxquestions.org/questions/programming-9/php-unicode-global-variable-423090/)

jayakrishnan 03-09-2006 04:16 AM

php unicode global variable
 
My HTML file
------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>

<form action="insert.php" method="post">
<input type=text name=nm rows=2 style="font-family:Bamini;width:50% ">
<input type=submit>
</form>
</html>

insert.php
----------

<?php

header('Content-Type: text/html; charset=utf-8');

$username="ODBC";
$password="123mysql123";
$database="inrlf";

echo $_POST['nm'];

?>

I am trying to get a unicode value in the html form and print it thru the php file, but the php file prints it in plain english , do i have to do some convertion here

Regards
JayaKrishnan

AdaHacker 03-10-2006 04:19 PM

The code you posted worked for me. I pasted some UTF-8 Cyrillic characters into the box and got back the same characters when I posted the form. Or is that not what you're trying to do?


All times are GMT -5. The time now is 02:40 AM.