Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Store Urdu in Mysql

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Store Urdu in Mysql

Postby Sohaib » Fri Dec 23, 2011 5:47 am

i have tried to insert urdu in Data Base using following code and HTML but i cant get required result.Can any one help me

$con = mysql_connect("localhost","root","");
if (!$con)
die('Could not connect: ' . mysql_error());

mysql_query('SET character_set_results=utf8');
mysql_query('SET names=utf8');
mysql_query('SET character_set_client=utf8');
mysql_query('SET character_set_connection=utf8');
mysql_query('SET character_set_results=utf8');
mysql_query('SET collation_connection=utf8_general_ci');

if ($_POST['submitForm'] == "yes")

$nithi = "INSERT INTO TAMIL set data='$urdu'";


<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<form action="" id="frmurdu" name="frmurdu" method="post">
<input type="hidden" name="submitForm" value="yes">
<input type="text" id="urdu" name="urdu">
<input name="image" type="image" src="images/submit.gif" width="82" height="26" />

plz plz help me in this matter
New php-forum User
New php-forum User
Posts: 1
Joined: Fri Dec 23, 2011 5:39 am

Re: Store Urdu in Mysql

Postby egami » Fri Dec 23, 2011 6:11 am


INSERT into {table} (`fieldname1`,`fieldname2`,`fieldname3`) VALUES ('value1','value2','value3')

$table = 'myTable';
INSERT INTO $table ('name','age','gender') VALUES ('Bubba',30,'M')

INSERT INTO $table VALUES ('Bubba',30,'M')
--- Albeit this assumes there are only 3 fields in the table.. You must match the column count with the variables in this scenario.

to UPDATE mysql

UPDATE $table SET fieldname=value // This sets the fieldname on EVERY ROW..
UPDATE $table SET `fieldname`='value' WHERE id='$id' // This updates ONLY the ROW with the id of $id
User avatar
php-forum GURU
php-forum GURU
Posts: 2196
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Re: Store Urdu in Mysql

Postby mirzasam » Mon Sep 30, 2013 5:03 am

mysql can even tech me how dose it work in urdu
New php-forum User
New php-forum User
Posts: 1
Joined: Mon Sep 30, 2013 5:01 am

Return to PHP coding => General

Who is online

Users browsing this forum: Google [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.