Okay so I am total noob in php since I recently started watching videos on php. So what I am trying to do is I have this html file:
<!DOCTYPE html>
<html>
<head>
<title>Testing PHP</title>
</head>
<body>
<form action="action.php" method="POST">
<input type="text" name="first">
<input type="text" name="second">
<input type="submit" value="Submitto!">
</form>
</body>
</html>
and then I have my action.php file which has this code:
<!DOCTYPE html>
<html>
<head>
<title>Testing PHP</title>
</head>
<body>
<?php
$first = $_POST['first'];
$second = $_POST['second'];
echo $first + $second;
?>
</body>
</html>
However when I click on the submit button in my html file it sends me to a blank page. By the url I see that it has sent me to the right file but seems like the code doesn't execute.
PS: I tried searching on google but what I found was mostly stuff about apache not executing php which doesn't work for me since I try to run the files locally on my machine.