Monday, 25 June 2018

PHP- Step by Step To Store and Retrieve Tamil Fonts in PHP and MySQL?

PHP- How to Store and Retrieve Tamil Fonts in PHP and MySQL?


In this post explained for how to store and retrieved tamil fonts in PHP and MySQL database.  here explain step by step

Previous post explained how to display tamil fonts in webpage in detailed.. that way first design in form in your webpage

Step 1: Design form in your (HTML ) Webpage


Step 2 :   Below code copy and save customers.php



<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<h2>Add New Customers</h2>
  <form name="customer" method="post" action="customers-add.php">
        <table>
         <tr><td>பெயர் </td><td><input type="text" name="cname" required /></td></tr>
        <tr><td>தொழில் </td><td><input type="text" name="occupation" required/></td></tr>
        <tr><td>விலாசம் </td><td><input type="text" name="address" required/></td></tr>
         <tr><td>ஊர் பெயர்  </td><td><input type="text" name="city" required/></td></tr>
        <tr><td>கைபேசி எண்  </td><td><input type="text" name="mobile" required/></td></tr>
        
        <tr><td></td><td><input type="submit" name="submit" value="SAVE CUSTOMER" /></td></tr>
        </table>
        </form>
</body>
</html>






Step 3 : 

Create Table in MySQL Database, just fieldname, length, additional SET as collation is
utf8_general_ci





Step 3 : 

Tables created successfully then go to coding action page


Step 4: 

Action page customers-add.php

<?php       
                 $cname=$_POST["cname"];
$occupation=$_POST["occupation"];
$address=$_POST["address"];
$city=$_POST["city"];
$address1=$address.",".$city;
$mobile=$_POST["mobile"];
$cusid=$branchcode."-$cname";

include("config1.php");
$q="insert into customers values('','$cname','$occupation','$address1','$mobile')";
$r=mysqli_query($link,$q);
if($r)
{
echo "<h3>கஸ்டமர் தகவல் பதிவு செய்யப்பட்டது !</h3>";
}
else
{
echo "<h3>கஸ்டமர் தகவல் பதிவு செய்ய முடியவில்லை  ! மன்னிக்கவும் </h3>";

}

?>



இந்த பதிவு பயன் உள்ளதாக இருக்கும் என நம்புகிறேன் ! நன்றி 



No comments:

Post a Comment

What is AI- Artificial Intelligence - தமிழில்

Artificial Intelligence : Artificial intelligence leverages computers and machines to mimic the problem-solving and decision-making capabili...