Hello i need help my code and database is working 100% fine on localhost but when i upload website on hosting server php is not updating database. on localhost its working completely fine. my code support php version 5.6 so i have also updated php version 5.6 on cpanel but i dont know why its not work on hosting server. my code is below
<?php
ob_start();
include("db_connection.php");
$sql="select distinct userid , emailadress, Name ,allow from account where `allow` = 'y' ";
$SQLRes=mysql_query($sql);
$s=0;
while($SQLRow=mysql_fetch_array($SQLRes)){
$s=$s+1;
$userID=$SQLRow["userid"];
$email=$SQLRow["emailadress"];
$nn=$SQLRow["Name"];
$tot=0;
$rr="converted to order";
$sr="";
$sqlo="select * from orders where userID='".$userID."' and priceStatus='Receiveable' and orderType !='Quote' ";
$SQLReo=mysql_query($sqlo);
while($SQLRo=mysql_fetch_array($SQLReo)){
$tot=$tot+$SQLRo["prices"];
}
$sqlt="insert into invtotal ( userName ,totalAmount , invStatus , userEmail , namee) values ('".$userID."' , ".$tot." , 'Receiveable' , '".$email."' , '".$nn."') ";
echo $sqlt;
mysql_query($sqlt);
}
header("location:invoice.php");
ob_flush();
?>