<form name="from" id="from">
<input type="text" name="x" onkeyup="Get_Value()"/>
<input type="text" name="y" onkeyup="Get_Value()"/>
</form>
<script type="text/javascript">
function Get_Value() {
var x = Number(document.from.x.value);
var y= Number(document.from.y.value);
var total=x+y;
document.getElementById("total").innerHTML =total;
}
</script>
<?php
$total='<div id="total"></div>';
echo $total;
?>
When I execute this and put x=10, y=20 then it shows me 30 to the browser. Its fine.
When I save it the DB then it storing <div id="total">30</div>
. But I need the 30 only.
Though the title of the question is a common one, I didn't found my answer.
What should I do now?