This is my JS file
function save()
{
var hist = document.getElementById("hist").value;
var mission = document.getElementById("mission").value;
var params = "history=" + hist+ "&mission=" + mission;
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function()
{
if (this.readyState == 4 && this.status == 200 )
{
UserAccountInfo = this.responseText;
alert(UserAccountInfo);
}
}
xmlhttp.open("POST","savecompany.php",true);
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.send(params);
}
hist msg will be
Founded by Engineer Anas El-Menoufi after 8 years of experience as marketing advisor and business development manager for W.C Heraus GmbH in Africa and Middle East. Since 1983 MYMSA is recognized in the Egyptian market as one of the first companies in Egypt and MENA region specialized in the supply of solutions, instrumentation, consultancy and after sales service for primary & secondary testing and calibration laboratories in many fields.
and mission will be
Aims to gain customers' trust & satisfaction by providing the best consultancy, raising the market awareness as well as partnering with the best manufacturers all over the world.
We believe that building our internal capabilities will reflect on the market.
after sending these variables to PHP file
hist became
Founded by Engineer Anas El-Menoufi after 8 years of experience as marketing advisor and business development manager for W.C Heraus GmbH in Africa and Middle East. Since 1983 MYMSA is recognized in the Egyptian market as one of the first companies in Egypt and MENA region specialized in the supply of solutions, instrumentation, consultancy and after sales service for primary
and mission
Aims to gain customers' trust
Only!!! Why this happens??? And how can I send the whole large message ??
This is my PHP file
<?php
require "conn.php";
$history= $_POST["history"];
$mission = $_POST["mission"];
$sql = " UPDATE company SET history ='$history' , mission='$mission' where id='1'";
mysqli_query($conn,$sql);
echo "done";
mysqli_close($conn);
?>