Make multiplication using PHP

Hi,

I just want to make a web page where people insert the area of a room and they get a price to renew it. I try to make a multiplication using PHP but it doesn’t work.

Here the PHP code I had in a Widget Code :
<?php echo “test”;
if(isset($_POST[‘valider’])){
surface=_POST[‘surface’]*45;
echo $surface;
}
?>

In blocs I have a form with a field called “surface”, the action is “index.php” and the button is called “valider”.

Thx for your help

Try


<?php echo “test”;
if(isset($_POST[‘valider’])){
$surface=$_POST[‘surface’]*45;
echo “$surface”;
}
?>