Last active
June 21, 2023 22:28
-
-
Save SitesByYogi/2284abb5038b211a42a7bc7bbd1212c4 to your computer and use it in GitHub Desktop.
basic php form with HTML markup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- HTML form --> | |
<form method="POST" action="process.php"> | |
<input type="text" name="name" placeholder="Your name"> | |
<input type="submit" value="Submit"> | |
</form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- process.php --> | |
<?php | |
if ($_SERVER["REQUEST_METHOD"] === "POST") { | |
$name = $_POST["name"]; | |
echo "Hello, " . $name . "!"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment