I am using php 7.2...
The code is working fine
<?php
$add=mysqli_query($conn,'SELECT ac_id, SUM(amount) from stac where ac_id="117" ');
while($row1=mysqli_fetch_array($add)) { $mark=$row1['SUM(amount)'];
echo $mark ; }?>
but the code below is not working. Please help me.
<?php
$ac_id=$_POST['ac_id'];
$add=mysqli_query($conn,'SELECT ac_id, SUM(amount) from stac where ac_id=$ac_id ');
while($row1=mysqli_fetch_array($add)) { $mark=$row1['SUM(amount)'];
echo $mark ; }?>