simple form in html using php | Class Assignment

if (isset ($_POST["submit"])){
  $name = $_POST["name"];
  $fatherName = $_POST["fname"];
  $Dob = $_POST["date"];
  $eml = $_POST["email"];

  echo "name is: $name, <br>".
  " Father name is: $fatherName, <br>".
  "Date of birth is: $Dob <br>".
  "Email is: $eml";

<!DOCTYPE html>
<html lang="en" dir="ltr">
    <meta charset="utf-8">
    <title>Email function</title>
    <form class="" action="" method="post">
      <label for="">Name:</label>
      <input type="text" name="name" value="" placeholder="Enter your name">
      <label for="">Father Name:</label>
      <input type="text" name="fname" value="" placeholder="Enter your Fathe Name">
      <label for="">Date of birth:</label>
      <input type="date" name="date" value="">
      <label for="">Email:</label>
      <input type="email" name="email" value="" placeholder="Enter your email">
      <input type="submit" name="submit" value="submit">

This site uses Akismet to reduce spam. Learn how your comment data is processed.



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