I learn coding in my free time and I tried creating HTML website referring to PHP file. I know that similar problem was discussed here already, but I am NOT using Apache or something and I am beginner, so I did not really understand that answers - can you anyone explain more easy way?
This is my HTML code:
<form action = "prihlaseni.php" method = "POST" >
<input type = "text" name= "uzivatel" placeholder = "uzivatelske jmeno">
<br>
<input type = "password" name= "heslo" placeholder = "heslo">
<br>
<button type = "submit">PRIHLASIT</button>
<br>
</form>
I read that it should call the PHP file and execute code in it. Here is my PHP file:
<?php
$uzivatel = $_POST['uzivatel'];
$heslo = $_POST['heslo'];
echo $uzivatel;
echo $heslo;
?>
I thought that the website will show the text called "uzivatel" and "heslo", but it shows the code (up here) as a plain text. I am enclosing a picture of it:
Would you explain me why, someone?