0

I'm pretty new to HTML/PHP/etc so maybe I'm just missing something really stupid but I'm trying to create a form that redirects me to a PHP file and for some reason when I click the "submit" button it just downloads the PHP file instead... I'm using Google Chrome, I don't know if that makes any difference. Here is the code, any help is appreciated :)

<html>
<body>

<form action="test.php" method="post">
    Name: <input type="text" name="name"><br>
    E-mail: <input type="text" name="email"><br>
    <input type="submit">
</form>

</body>
</html>

and my php file is:

<html>
<body>

Welcome <?php echo $_POST["nome"]; ?><br>
Your email address is: <?php echo $_POST["email_register"]; ?>

</body>
</html>

Thanks for the time :)

  • Do you have any webserver with PHP integration running on your system in the first place? And if you, are you accessing this via HTTP in your browser (and not via the file system)? – CBroe May 23 '22 at 14:15

0 Answers0