I am trying to build a website that would provide me with the value of Pi up to decimal places desired by the user. If the user wants to see value of pi upto 2 decimal place then he/she needs to provide input 2 and value will be displayed as 3.14. I have written a php file but while trying to host the file via xampp I am getting the following errors
This is my code:
<?php
$con=mysqli_connect("localhost","whoop_root_596","Ns4td1^9","demo_pi");
$curTime = microtime(true);
$f_val=$_POST["f_val"];
$response = array();
$statement = mysqli_query($con, "SELECT * FROM pi_value where sl='1'") or die(mysqli_error($con));
while($row=mysqli_fetch_array($statement))
{
    $pi_value = $row['vl'];
}
    $pi_value_explode = explode(",", $pi_value);
    $lv="";
    for($i=0;$i<$f_val;$i++)
    {
        $lv=$lv.$pi_value_explode[$i];
        if($i%150==0)
            if($i>150)
            {}
    }
    $timeConsumed = round(microtime(true) - $curTime,3)*1000; 
    $fsval="3.".$lv;
    $sdval="Time Consumed: ".$timeConsumed."ms";
$response = array( array('val1' => $fsval, 'val2' => $sdval) );
echo json_encode($response);
mysqli_close($con);
?> 
These are the errors getting displayed shown in the picture: enter image description here
kindly provide an effective solution. Any help will be kind enough
 
    