-------------------UPDATE SOLVED the file was a .html extension and not a .php file - - Thanks for the help!
I've seen a few posts explaining how to echo html submitted form information on the same page using php. When I try to implement this I always get an error when playing php tags inside the form action = "".
Here is the code...
Hello <?php echo $_POST["name"]; ?><br>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
Name: <input type="text" name="name">
<input type="submit">
</form>
Just a try:
Hello <?php echo $_POST["name"]; ?><br>
<form action=<?php echo '"' . $_SERVER['PHP_SELF'] . '"'; ?> method="post">
Name: <input type="text" name="name">
<input type="submit">
</form>
Try this:
<?php echo isset($_POST["name"])?"Hello, " . $_POST["name"]:""; ?><br>
<form action=<?php echo '"' . $_SERVER['PHP_SELF'] . '"'; ?> method="post">
Name: <input type="text" name="name">
<input type="submit">
</form>