I have a web application in a server(1st server) , But i am inserting data with a php page which is kept in other server(2nd server) . I am updating sql value through 2nd server web page .while i run update query database is updating , even updating information is showing in 2nd server front end and data base . But application is running with previous value .
In the web application (front end admin panel) there is a button Name "Edit " , while i click on edit button without inserting any value , its update value at that time and working with the value which i have updated through 2nd server web page .
Edit button code (web applicatiion 1st server font end code)
<FORM action="aegateway.jsp" method="POST" id='aeform' name='aeform' onSubmit="javascript:document.getElementById('submitbutton').disabled=true">
<input type="hidden" name="cookie" value="535359523575209555454557521795755555652554555575226556501345397543575443548154" />**
<input type="hidden" name="submitted" id="submitted" value="true" />
<input type='hidden' name='rk' value='189' />
<INPUT class='ibutton bwidth' type='submit' name='submitbutton' id='submitbutton' value='EDIT' /> <br><br>
</FORM>
second server update query code :
$sql = "SELECT AVG(column_name) as column_name1st, column_name2nd FROM table_name WHERE column_name = '0122' && column_name1st > 0";
$result = $mysqli->query($sql);
while($row = $result->fetch_assoc()) {
$meanvalue = $row["column_name1st"];
}
if($column_name1st > 70){
$mysqli->query("UPDATE table_name2 SET field_name_one='0', field_name_two='30' WHERE username='user_id'");
}
elseif($meanvalue < 60)
{
$mysqli->query("UPDATE table_name2 SET field_name_one='6', field_name_two='0' WHERE username='user_id'");
}
Finally i wanna to update value from 2nd server php page , which will execute in the web application in 1st server . both server access i have but project is need to run php mysql effective script from 2nd server data base update successfully also show on 1st server page but programme runing on previous value, application is performing with previous value. I already successfully updated data from 2nd server just want to know how to execute pregramme which one run on current value which was updated from 2server
i have tried with commit function but not working :
$sql = "SELECT AVG(duration) as duration, clientrateprefix FROM cdr_$mytable WHERE clientrateprefix = '8801' && duration > 0";
$result = $mysqli->query($sql);
while($row = $result->fetch_assoc()) {
$meanduration = $row["duration"];
}
if($meanduration > 120){
$mysqli->query("UPDATE tablename SET field_name='value', field_name='value' WHERE colum_name='user_id'");
}
elseif($meanduration < 60)
{
$mysqli->query("UPDATE tablename SET field_name='3', field_name_two='value' WHERE colum_name='user_id'");
}
$mysqli->commit();
</div>