LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 03-09-2006, 05:16 AM   #1
jayakrishnan
Member
 
Registered: Feb 2002
Location: India
Distribution: Slacky 12.1, XP
Posts: 991

Rep: Reputation: 30
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
 
Old 03-10-2006, 05:19 PM   #2
AdaHacker
Member
 
Registered: Oct 2001
Location: Brockport, NY
Distribution: Kubuntu
Posts: 384

Rep: Reputation: 31
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Python Global Variable? ElementNine Programming 5 11-05-2007 01:53 PM
Define global variable maxmil Linux - Newbie 4 03-07-2006 11:36 AM
How can I define a global variable? kloss Linux - General 4 02-21-2006 05:30 AM
problems with a global variable javier_ccs Programming 2 06-21-2005 01:18 PM
python global variable? goestin Programming 1 01-20-2005 07:52 AM


All times are GMT -5. The time now is 06:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration