php calculation keeps getting the answer as 0

this is the index.php file

if(isset($_POST['submit']))
{
    echo header('Location:answer.php');
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="container">
        <form method="post">
            <div class="form-group">
                <label> Insert P value </label>
                <input type="text" name="p" placeholder="please insert your P value">
</div>
<br>

<div class="form-group">
    <label> Insert R value </label>
    <input type="text" name="r" placeholder ="please insert your R value ">
    
</div>
<br>
<div class="form-group">
    <label> Insert your N value </label>

    <input type="text" name="n" placeholder=" please insert your N value">

</div>
<br>
    <button type="submit" name="submit" > Submit </button>
</body>
</html>

this is the answer.php file

<?php

$p=isset($_POST['p'])?$_POST['p']: " ";
$r=isset($_POST['r'])?$_POST['r']:" ";
$n=isset($_POST['n'])?$_POST['n']: " ";
$si=(int)$p*(int)$r*(int)$n/100;
echo "Hello this is the final answer ".$si;
?>

i want the answer to be displayed in another page that is answer.php but whatever number i am inserting i keep getting the answer as 0. Please help and thank you.