Browser output is my the code that makes up the php file I am attempting to execute. I want the php to take form input and just display the echo.
I have run the php by itself and it runs fine. For example, I have given variable values and echoed them and it prints correctly.
How do I make the php file take what is entered into the html file and the execute?
HTML form:
<form action="my_page.php" type="post">
Email:<input name="email" type="text"><br>
Password:<input name="password" type="password">
<input type="submit" value="Submit">
</form>
php:
<?php
//Variables
$email = $_POST['email'];
$password = $_POST['password'];
echo "Your account email is: " + $email + " and password is: " +
$password";
?>
The browser display is:
<?php
//Variables
$email = $_POST['email'];
$password = $_POST['password'];
echo "Your account email is: " + $email + " and password is: " +
$password";
?>
which is the same as the php code. I want it to display "Your account email is: (whatever email is entered) and password is (whatever password is entered)"