use this following script i think it will solve your problem. I test this is working right.
<?php
if(isset($_POST['submit'])){
echo "<pre>"; print_r($_POST); die;
}
?>
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<title>Testing</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- <script type="text/javascript" src="
https://www.google.com/jsapi"></script>-->
<script type="text/javascript" src="api.js"></script>
<script type="text/javascript">
// Load the Google Transliterate API
google.load("elements", "1", {
packages: "transliteration"
});
function onLoad() {
var options = {
sourceLanguage: 'en',
destinationLanguage: ['hi'],
transliterationEnabled: true
};
var control = new google.elements.transliteration.TransliterationControl(options);
var ids = [ "first_name", "last_name", "comm" ];
control.makeTransliteratable(ids);
}
google.setOnLoadCallback(onLoad);
</script>
</head>
<body>
<form name="frm" action="" method="post">
<table width="30%" style="border:1px solid #06F;background-color:#CFC" align="center">
<tr> <td colspan="2" align="center">Working Demo :</td></tr>
<tR>
<td>First Name:</td>
<Td><input type="text" name="first_name" id="first_name"></Td>
</tR>
<tR>
<td>Last Name:</td>
<Td><input type="text" name="last_name" id="last_name"></Td>
</tR>
<!--<tR>
<td>Comment:</td>
<Td><textarea name="comm" id="comm"></textarea></Td>
</tR>-->
<tR>
<Td colspan="2" align="center"><input type="submit" name="submit" value="Submit"></Td>
</tR>
</table>
</form>
</body>