Code for simple form in HTML with PHP

<?php

if (isset($_POST["btn"])) {
 
$nam=$_POST["name"];
$eml=$_POST["email"];
$pass=$_POST["password"];
 
    echo "$nam <br>";
    echo "$eml <br>";
    echo "$pass <br>";

}

?>

<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
        <form action="" method="post">
            <input type="text" name="name" placeholder="Enter your name">
            <br>
            <input type="email" name="email" placeholder="Enter your email">
            <br>
            <input type="password" name="password" placeholder="Password">
            <br>
            <input type="submit" name="btn" value="Button">
        </form>
</body>
</html>

Share it in your network:

Leave a Comment

Your email address will not be published.

small_c_popup.png

Congratulations!

You have successfully subscribed to my email list. Now you will be recieving latest wordpress tips and tricks directly in your mail box.

Don’t worry! I won’t spam you