My sql arabic value

Page 1 of 1

1 Replies - 159 Views - Last Post: 18 June 2014 - 02:44 PM Rate Topic: -----

#1 Desertt  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 91
  • Joined: 27-October 13

My sql arabic value

Posted 18 June 2014 - 02:22 PM

Hi i have this database
Name varchar(100) utf8_general_ci
Address varchar(200) utf8_general_ci
and this is the php and html
<html>
<body>
<form method="POST" action="DeleteLater.php">
<input type="text" name="Name" palceholder="Name"></br>
<input type="text" name="Address" palceholder="Address"></br>
<input type="submit" name="submit">
</form>
</body>
</html>


and this is the php
<?php
include("Config.php");

$table = 'publ';
		mysql_query("SET NAMES 'utf8'"); 
		mysql_query('SET CHARACTER SET utf8');
// If user pressed submit in one of the forms
if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
    // cleaning Milage field
		
		$Name = $_POST['Name'];
		$Address = $_POST['Address'];

                mysql_query("INSERT INTO {$table}
                                SET
								 Name='$Name', 
								Address='$Address'");
								
}
?>



But the value saved in the database are
(&#1593 &#1234 .......) when it should be saved as
دار العل... بيروت
how can i save the value in the proper way i mean to save the value in arabic
any help

This post has been edited by Desertt: 18 June 2014 - 02:23 PM


Is This A Good Question/Topic? 0
  • +

Replies To: My sql arabic value

#2 BetaWar  Icon User is online

  • #include "soul.h"
  • member icon

Reputation: 1167
  • View blog
  • Posts: 7,208
  • Joined: 07-September 06

Re: My sql arabic value

Posted 18 June 2014 - 02:44 PM

I am going to close this one since there is already another thread here: http://www.dreaminco...l-arabic-value/
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1