i have some hindi and urdu writing stored in my database xampp there i set utf8_unicode_ci
and firstly i wrote this line
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
on my webpage before <title>
tag and then i replace uper line with this line <meta charset="utf-8"/>
.
When i insert values in 'phpmyadmin' and show those values on webpage it shows ?????
question marks on webpage but in 'phpmyadmin' it shows fine uni-code writing.
And then i update those uni-code columns through my webpage after updating those values they they got nice view of writing on webpage but now this time in database column it shows آب Ùˆ Ûوا
these type or charters.
now i m not getting what happning i correct one side, other side transformed in to 'unicode-less'.
this is my web page code and i m using php 5.6.11
<!doctype html>
<html>
<head>
<link href="drop_down.css" rel="stylesheet" type="text/css" />
<link href="tooplate_style.css" rel="stylesheet" type="text/css" />
<meta charset="utf-8"/>
<title>Main Page</title>
</head>
<body>
<div>
<div align="right"> <form action="logout.php" method="post"> <input type="submit" value="Log Out" class="Lbtn" name="L_btn"> </form> </div>
<header align="center"><a href="index.html"> Talash -e- Haraf </a> </header>
<nav align="center">
<form action="" method="post">
<input name="srch" type="text" class="searchbar" placeholder="Select language and type word here">
<select name="drp_dwn" class="dropdown dropdown-select" onchange="location = this.options[this.selectedIndex].value;">
<option>--Please Select--</option>
<option value="srch_ru.php">Roman</option>
<option value="srch_e.php">English</option>
</select>
<input name="btn" type="submit" class="button" value="Search">
</form>
</nav>
<div align="right">
<table class="responstable">
<tr>
<th>Pos</th>
<th>Roman</th>
<th>Urdu</th>
<th>Significance</th>
<th>Hindi</th>
<th>English</th>
<th>Type</th>
<th>Action</th>
</tr>
<tr>
<?php
$db=mysqli_connect("localhost","root","","app");
foreach($db->query('SELECT * FROM lafaz') as $obj)
{
?>
<td> <?php echo $obj["pos"] ?></td>
<td> <?php echo $obj["roman"] ?></td>
<td> <?php echo $obj["urdu"] ?></td>
<td> <?php echo $obj["important"] ?></td>
<td> <?php echo $obj["hindi"] ?></td>
<td> <?php echo $obj["english"] ?></td>
<td> <?php echo $obj["type"] ?></td>
<td> <a href="detail.php?id=<?php echo $obj['id']; ?>"> <img title="View Detail" src="detail.png" width="40px" height="35px"/> </a>
<a href="edit.php?id=<?php echo $obj['id']; ?>"> <img title="Edit Item" src="edit.png" width="40px" height="35px"/> </a>
<a href="delete.php?id=<?php echo $obj['id']; ?>"> <img title="Delete Item" src="delete.png" width="40px" height="35px"/> </a> </td>
</tr>
<?php
}
?>
</table>
</div>
</div>
</body>
</html>